Inconsistent behavior when writing commit comments
Describe the bug The multiline comment behavior differs between the Commits > "reword commit" action and the Files > "commit" action.
With "reword commit", wrapping happens automatically, but with "commit", I need to use the TAB key to enter a newline and there is no automatic wrapping.
To Reproduce Steps to reproduce the behavior:
- Make a new commit with the Files > "commit" action.
- Type a long commit comment that goes past the right-side end of the text area. The commit comment does not wrap.
- Commit the changes.
- Choose the new commit and change its comment with the Commits > "reword commit" action.
- Type a long commit comment that goes past the end of the right-side end of the text area. The commit comment wraps to fit the text area and the text area extends downward.
The inconsistency in behavior between these two commands is the bug.
Expected behavior Wrapping behavior should be the same for both the "reword commit" and "commit" actions. I don't strongly recommend which action's behavior should become the standard.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Pop!_OS 20.04
- Lazygit Version commit=, build date=2020-10-14, build source=debian, version=0.23.6, os=linux, arch=amd64
We also discussed this as part of #28.
Also the opt enter key command to line break the message doesn't work in "reword commit".
Tab is the only option that works for me on Mac OS Ventura
keybinding:
universal:
# > ...should be able to use cmd+enter on mac: https://github.com/jesseduffield/lazygit/issues/28#issuecomment-953460275
# note, doesn't work in reword commit: https://github.com/jesseduffield/lazygit/issues/1344
# appendNewline: "<a-enter>" # not working for me
appendNewline: "<tab>" # works
# appendNewline: "<c-space>" # any keystroke enters newline
The Commit window is currently under reconstruction so hopefully this issue will be resolved when it's merged :)
Hmm will reworking the commit window have an effect on the reword window?
Yes, it should use the same logic.
I take it this is now resolved, given that the Commit window has been reworked in the latest major release?
This is resolved in release v0.39.0