From: Vitaly _Vi Shukela Date: Fri, 14 Sep 2012 23:36:41 +0000 (+0300) Subject: git-gui: Fix semi-working shortcuts for unstage and revert X-Git-Tag: v1.8.0~1^2~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=44e88ce07838fd20d7187d3031916095ce823255;p=git.git 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 Signed-off-by: Vitaly _Vi Shukela Signed-off-by: Pat Thoyts --- diff --git a/git-gui.sh b/git-gui.sh index 936b367ba..5d035d5a1 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -3715,6 +3715,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 {catch {%W yview scroll -1 units};break} bind $ui_diff {catch {%W yview scroll 1 units};break} bind $ui_diff {catch {%W xview scroll -1 units};break} @@ -3747,6 +3749,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