git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] git-gui blame add more common search hotkeys
@ 2011-07-16 16:59 David Fries
  2011-07-19 14:35 ` Pat Thoyts
  0 siblings, 1 reply; 3+ messages in thread
From: David Fries @ 2011-07-16 16:59 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-20  2:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-16 16:59 [PATCH 2/2] git-gui blame add more common search hotkeys David Fries
2011-07-19 14:35 ` Pat Thoyts
2011-07-20  2:56   ` David Fries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).