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

ZZ/ZQ shortcuts for rebase message editor #1296

Closed
chuckhousley opened this issue May 17, 2024 · 1 comment · Fixed by #1299
Closed

ZZ/ZQ shortcuts for rebase message editor #1296

chuckhousley opened this issue May 17, 2024 · 1 comment · Fixed by #1299

Comments

@chuckhousley
Copy link

chuckhousley commented May 17, 2024

nvim nightly, neogit master as of this evening
Is your feature request related to a problem? Please describe.
Feature parity with magit, expected behavior within nvim. Currently ZZ in a rebase message buffer does not edit the commit message but instead creates a new commit.

Describe the solution you'd like
Select a commit and use the [r]ebase -> re[w]ord action
Pressing ZZ in normal mode (the vim "write and quit" shortcut) within the buffer should behave as does and perform the reword action instead of creating a new commit. ZQ should behave as <c-c><c-k> does. If the reword buffer has been manually saved, ZQ will quit and create a new commit with the saved buffer as the message, <c-c><c-k> discards the new rewritten message even if the buffer was manually saved.

Describe alternatives you've considered
I have added the mappings to the rebase_editor map in lua/neogit/config.lua, this seems to match the behavior I am expecting but I haven't tested beyond a few commits.

Thanks

@CKolkey
Copy link
Member

CKolkey commented May 17, 2024

Good catch, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants