Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behavior when writing commit comments #1056

Closed
jbrains opened this issue Oct 16, 2020 · 8 comments
Closed

Inconsistent behavior when writing commit comments #1056

jbrains opened this issue Oct 16, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@jbrains
Copy link
Contributor

jbrains commented Oct 16, 2020

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:

  1. Make a new commit with the Files > "commit" action.
  2. Type a long commit comment that goes past the right-side end of the text area. The commit comment does not wrap.
  3. Commit the changes.
  4. Choose the new commit and change its comment with the Commits > "reword commit" action.
  5. 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
@jbrains jbrains added the bug Something isn't working label Oct 16, 2020
@jbrains
Copy link
Contributor Author

jbrains commented Oct 16, 2020

We also discussed this as part of #28.

@Amparose
Copy link

Also the opt enter key command to line break the message doesn't work in "reword commit".

@ptim
Copy link

ptim commented Feb 7, 2023

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

@mark2185
Copy link
Collaborator

mark2185 commented Feb 7, 2023

The Commit window is currently under reconstruction so hopefully this issue will be resolved when it's merged :)

@tivervac
Copy link

Hmm will reworking the commit window have an effect on the reword window?

@mark2185
Copy link
Collaborator

Yes, it should use the same logic.

@mark2185
Copy link
Collaborator

mark2185 commented Jul 7, 2023

I take it this is now resolved, given that the Commit window has been reworked in the latest major release?

@jesseduffield
Copy link
Owner

This is resolved in release v0.39.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants