Skip to contentSkip to conversation

git-gui: Fix semi-working shortcuts for unstage and revert

PATCH New [email protected] 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-gui: Fix semi-working shortcuts for unstage and revert

From: Vitaly _Vi Shukela <[email protected]>

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.

---
No reply to previous email received, re-sending with new Cc: as recommented on #git-devel.

 git-gui/git-gui.sh |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
git-gui/git-gui.sh +4 -0
index ba4e5c1..6618016 100755
@@ -3710,6 +3710,8 @@ bind $ui_diff <$M1B-Key-v> {break}
 bind $ui_diff <$M1B-Key-V> {break}
 bind $ui_diff <$M1B-Key-a> {%W tag add sel 0.0 end;break}
 bind $ui_diff <$M1B-Key-A> {%W tag add sel 0.0 end;break}
+bind $ui_diff <$M1B-Key-j> {do_revert_selection;break}
+bind $ui_diff <$M1B-Key-J> {do_revert_selection;break}
 bind $ui_diff <Key-Up>     {catch {%W yview scroll -1 units};break}
 bind $ui_diff <Key-Down>   {catch {%W yview scroll  1 units};break}
 bind $ui_diff <Key-Left>   {catch {%W xview scroll -1 units};break}
@@ -3742,6 +3744,8 @@ bind .   <$M1B-Key-s> do_signoff
 bind .   <$M1B-Key-S> do_signoff
 bind .   <$M1B-Key-t> do_add_selection
 bind .   <$M1B-Key-T> do_add_selection
+bind .   <$M1B-Key-u> do_unstage_selection
+bind .   <$M1B-Key-U> do_unstage_selection
 bind .   <$M1B-Key-j> do_revert_selection
 bind .   <$M1B-Key-J> do_revert_selection
 bind .   <$M1B-Key-i> do_add_all
Signature · 1 line
1.7.8.5