Skip to content

Commit e589414

Browse files
ismaellprati0100
authored andcommitted
git-gui: Handle Ctrl + BS/Del in the commit msg
- Control+BackSpace: Delete word to the left of the cursor. - Control+Delete : Delete word to the right of the cursor. Originally introduced by BRIEF and Turbo Vision between 1985 and 1992, they were adopted by most CUA-Compliant UIs, including those of: OS/2, Windows, Mac OS, Qt, GTK, Open/Libre Office, Gecko, and GNU Emacs. In both cases Tk already implements the functionality bound to other key combination, so we use that. Graphical examples: Deleting to the left: v------ pointer X_WORD____X ^-----^------ selection Deleting to the right: v--------- pointer X_WORD_X ^--^------ selection Signed-off-by: Ismael Luceno <[email protected]> Signed-off-by: Pratyush Yadav <[email protected]>
1 parent 88db24d commit e589414

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

git-gui.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3928,6 +3928,8 @@ bind $ui_comm <$M1B-Key-KP_Subtract> {show_less_context;break}
39283928
bind $ui_comm <$M1B-Key-equal> {show_more_context;break}
39293929
bind $ui_comm <$M1B-Key-plus> {show_more_context;break}
39303930
bind $ui_comm <$M1B-Key-KP_Add> {show_more_context;break}
3931+
bind $ui_comm <$M1B-Key-BackSpace> {event generate %W <Meta-Delete>;break}
3932+
bind $ui_comm <$M1B-Key-Delete> {event generate %W <Meta-d>;break}
39313933
39323934
bind $ui_diff <$M1B-Key-x> {tk_textCopy %W;break}
39333935
bind $ui_diff <$M1B-Key-X> {tk_textCopy %W;break}

0 commit comments

Comments
 (0)