Skip to content

Conversation

@callpraths
Copy link

This Pull Request fixes/closes #2704

Avoids a hindenbug due to two interpretations of Shift+U

  • It is the default key-binding to "undo last commit"
  • It is the key binding for "reset file" in the recommended vim-style bindings

There is a potential for confusion between those two actions and they have qualitatively different outcomes - the default binding is more of a user-data destroying action (though there's always reflog...)

This PR updates the suggested vim binding to lowercase u. This makes u the keybinding for:

  • "reset file" in status view.
  • "reset current hunk" in diff view.

Those two actions have the same scope - undo unstaged changes in working directory, so having the same key-binding makes sense.

I followed the checklist:

  • I added unittests [N/A: no functional changes]
  • I ran make check without errors
  • I tested the overall application
  • I added an appropriate item to the changelog

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 this pull request may close these issues.

Official vim-style config: Shift+U conflict can cause accidental commit undo

1 participant