From b677c66e299c8754a6093cbd19ce71b0ad2a8a17 Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Thu, 31 Dec 2009 15:32:53 +0200 Subject: [PATCH] git-gui: Add hotkeys for "Unstage from commit" and "Revert changes" Signed-off-by: Vitaly _Vi Shukela Signed-off-by: Shawn O. Pearce --- git-gui.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/git-gui.sh b/git-gui.sh index 718277a65..822d59867 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -2543,12 +2543,14 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} { [list .mbar.commit entryconf [.mbar.commit index last] -state] .mbar.commit add command -label [mc "Unstage From Commit"] \ - -command do_unstage_selection + -command do_unstage_selection \ + -accelerator $M1T-U lappend disable_on_lock \ [list .mbar.commit entryconf [.mbar.commit index last] -state] .mbar.commit add command -label [mc "Revert Changes"] \ - -command do_revert_selection + -command do_revert_selection \ + -accelerator $M1T-J lappend disable_on_lock \ [list .mbar.commit entryconf [.mbar.commit index last] -state] @@ -3296,6 +3298,10 @@ unset gws bind $ui_comm <$M1B-Key-Return> {do_commit;break} bind $ui_comm <$M1B-Key-t> {do_add_selection;break} bind $ui_comm <$M1B-Key-T> {do_add_selection;break} +bind $ui_comm <$M1B-Key-u> {do_unstage_selection;break} +bind $ui_comm <$M1B-Key-U> {do_unstage_selection;break} +bind $ui_comm <$M1B-Key-j> {do_revert_selection;break} +bind $ui_comm <$M1B-Key-J> {do_revert_selection;break} bind $ui_comm <$M1B-Key-i> {do_add_all;break} bind $ui_comm <$M1B-Key-I> {do_add_all;break} bind $ui_comm <$M1B-Key-x> {tk_textCut %W;break} -- 2.30.2