From: David Fries Date: Sat, 16 Jul 2011 16:59:45 +0000 (-0500) Subject: git-gui: Add keyboard shortcuts for search and goto commands in blame view. X-Git-Tag: gitgui-0.15.0~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=af9a4625fa7aeeb5bc52eed3af7e19579af31f42;p=git.git git-gui: Add keyboard shortcuts for search and goto commands in blame view. Use forward-slash or Control-S to bring up the search dialog. In the blame view, Enter or 'n' jump to the next selected region while Shift-Enter or Shift-n will jump to the previous selected region. Within the search control, hitting Enter will now jump to the next matching region. Signed-off-by: David Fries Signed-off-by: Pat Thoyts --- diff --git a/lib/blame.tcl b/lib/blame.tcl index 14fde8176..bc81e29b4 100644 --- a/lib/blame.tcl +++ b/lib/blame.tcl @@ -352,9 +352,13 @@ constructor new {i_commit i_path i_jump} { bind $w_cviewer [list focus $w_cviewer] bind $w_file [cb _focus_search $w_file] bind $top [list searchbar::show $finder] + bind $top [list searchbar::show $finder] + bind $top [list searchbar::show $finder] bind $top [list searchbar::hide $finder] bind $top [list searchbar::find_next $finder] + bind $top [list searchbar::find_next $finder] bind $top [list searchbar::find_prev $finder] + bind $top [list searchbar::find_prev $finder] bind $top [list linebar::show $gotoline] catch { bind $top [list searchbar::find_prev $finder] } diff --git a/lib/search.tcl b/lib/search.tcl index 7fdbf87bc..ef3486f08 100644 --- a/lib/search.tcl +++ b/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 [cb find_next] + bind $w.ent [cb find_prev] bind $w [list delete_this $this] return $this @@ -196,4 +198,4 @@ method scrolled {} { } } -} \ No newline at end of file +}