Skip to content

Commit 44e88ce

Browse files
vipatthoyts
authored andcommitted
git-gui: Fix semi-working shortcuts for unstage and revert
Make Ctrl+U for unstaging and Ctrl+J for reverting selection behave more like Ctrl+T for adding. They were working only when one area was focused (diff or commit message), now they should work everywhere. Acked-by: Bert Wesarg <[email protected]> Signed-off-by: Vitaly _Vi Shukela <[email protected]> Signed-off-by: Pat Thoyts <[email protected]>
1 parent 272b929 commit 44e88ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

git-gui.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3715,6 +3715,8 @@ bind $ui_diff <$M1B-Key-v> {break}
37153715
bind $ui_diff <$M1B-Key-V> {break}
37163716
bind $ui_diff <$M1B-Key-a> {%W tag add sel 0.0 end;break}
37173717
bind $ui_diff <$M1B-Key-A> {%W tag add sel 0.0 end;break}
3718+
bind $ui_diff <$M1B-Key-j> {do_revert_selection;break}
3719+
bind $ui_diff <$M1B-Key-J> {do_revert_selection;break}
37183720
bind $ui_diff <Key-Up> {catch {%W yview scroll -1 units};break}
37193721
bind $ui_diff <Key-Down> {catch {%W yview scroll 1 units};break}
37203722
bind $ui_diff <Key-Left> {catch {%W xview scroll -1 units};break}
@@ -3747,6 +3749,8 @@ bind . <$M1B-Key-s> do_signoff
37473749
bind . <$M1B-Key-S> do_signoff
37483750
bind . <$M1B-Key-t> do_add_selection
37493751
bind . <$M1B-Key-T> do_add_selection
3752+
bind . <$M1B-Key-u> do_unstage_selection
3753+
bind . <$M1B-Key-U> do_unstage_selection
37503754
bind . <$M1B-Key-j> do_revert_selection
37513755
bind . <$M1B-Key-J> do_revert_selection
37523756
bind . <$M1B-Key-i> do_add_all

0 commit comments

Comments
 (0)