Skip to content

Allow multi-line commit message from lazygit commit window #1790

@bartgol

Description

@bartgol

This might be a long shot, but I figured I asked.

Sometimes I need to make a long commit. Since c only allows a single-line commit (that I can tell, at least), I do <shift>+C, to open vim and type a well thought message. Then I save and close, and am prompted for the gpg passphrase to sign the commit. If by accident I type the wrong password, the signing fails, and I am returned to lazygit, but the long message is lost. On the other hand, if I make a typo when signing a commit made with c (i.e., from within lazygit), the commit msg is not lost, so hitting c again will bring it back.

I would like to be able to make multi-line commit msgs without losing the message if I accidentally fail to sign the commit. Since I doubt lazygit can cache the commit message when using an external editor, I feel like the best shot is enabling multi-line commit message from within lazygit (the window you get hitting c).

It is possible that I am missing how to make a multi-line commit msg from within lazygit. But assuming that's indeed not a current feature, it would be nice to add it. For instance, it would be convenient if the commit window treated and + differently, with one of the two implementing a soft return and the other a hard return (don't really care which does which). That's already common in a few interfaces (e.g., chat-like windows).

Regardless, thanks for developing (and constantly maintaining!) such a great tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions