[PATCH 2/2] git-gui blame add more common search hotkeys
- From
David Fries <david@fries.net>
- Date
- Jul 16, 2011, 16:59 UTC
- Message-ID
- <20110716165945.GA9722@spacedout.fries.net>
add slash and Control-S to bring up search enter, n, Shift-Enter, Shift-n to to go the next and previous entries
search hotkey return is find_next shift prev
Signed-off-by: David Fries <David@Fries.net>
--- git-gui/lib/blame.tcl | 4 ++++ git-gui/lib/search.tcl | 4 +++- 2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/git-gui/lib/blame.tcl b/git-gui/lib/blame.tcl index 062091b..cc8c0ba 100644 --- a/git-gui/lib/blame.tcl +++ b/git-gui/lib/blame.tcl @@ -352,9 +352,13 @@ constructor new {i_commit i_path i_jump} { bind $w_cviewer <Button-1> [list focus $w_cviewer] bind $w_file <Visibility> [cb _focus_search $w_file] bind $top <F7> [list searchbar::show $finder] + bind $top <Key-slash> [list searchbar::show $finder] + bind $top <Control-Key-s> [list searchbar::show $finder] bind $top <Escape> [list searchbar::hide $finder] bind $top <F3> [list searchbar::find_next $finder] + bind $top <Key-n> [list searchbar::find_next $finder] bind $top <Shift-F3> [list searchbar::find_prev $finder] + bind $top <Shift-Key-n> [list searchbar::find_prev $finder] bind $top <Control-Key-g> [list linebar::show $gotoline] catch { bind $top <Shift-Key-XF86_Switch_VT_3> [list searchbar::find_prev $finder] } diff --git a/git-gui/lib/search.tcl b/git-gui/lib/search.tcl index 7fdbf87..ef3486f 100644 --- a/git-gui/lib/search.tcl +++ b/git-gui/lib/search.tcl @@ -35,6 +35,8 @@ constructor new {i_w i_text args} { grid remove $w trace add variable searchstring write [cb _incrsearch_cb] + bind $w.ent <Return> [cb find_next] + bind $w.ent <Shift-Return> [cb find_prev] bind $w <Destroy> [list delete_this $this] return $this @@ -196,4 +198,4 @@ method scrolled {} { } } -} \ No newline at end of file +}
-- 1.7.2.5