git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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
Next: Pat Thoyts
Message 1 of 3 in “git-gui blame add more common search hotkeys”
  1. 2/2 git-gui blame add more common search hotkeysDavid Fries, Jul 16, 2011
  2. Pat ThoytsJul 19, 2011
  3. David FriesJul 20, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.