Problem
In the modal Commit dialog, pressing Ctrl+Z while typing in the Commit Message field opens the Rollback changes popup instead of undoing the text edit. The previous message text cannot be restored.
Cause
The Rollback action is mapped to Ctrl+Z in the keymap. In the modal commit dialog, this binding takes precedence over the standard text-editor undo when the Commit Message field has focus.
The default shortcut for Rollback is Ctrl+Alt+Z. The conflict occurs only in the modal commit interface; the non-modal commit interface handles Ctrl+Z as text undo even when Rollback is bound to that shortcut.
The modal commit dialog is in maintenance mode, so this behavior is not scheduled for a fix.
Resolution
Two options resolve the conflict.
Option 1: Remap the Rollback action
- Open Settings (Ctrl+Alt+S) | Keymap.
- Navigate to Main Menu | Git | VCS Group | Git | Rollback.
- Remove the Ctrl+Z binding or change it to the default Ctrl+Alt+Z.
- Click OK to apply the changes.
After remapping, Ctrl+Z in the Commit Message field undoes the last text edit.
Option 2: Switch to the non-modal commit interface
- Open Settings | Advanced Settings | Version Control
- Disable Use modal commit interface for Git and Mercurial.
- Click OK to apply the changes.
In the non-modal commit interface, Ctrl+Z in the Commit Message field undoes text edits regardless of the keymap binding for Rollback.
Reference: Commit changes locally
Comments
0 comments
Please sign in to leave a comment.