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 <David@Fries.net> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

David Fries committed Jul 16, 2011 at 11:59 UTC af9a4625fa7aeeb5bc52eed3af7e19579af31f42
2 files changed +7 -1
lib/blame.tcl
+4
@@ -352,9 +352,13 @@ constructor new {i_commit i_path i_jump} {
352 bind $w_cviewer <Button-1> [list focus $w_cviewer]
353 bind $w_file <Visibility> [cb _focus_search $w_file]
354 bind $top <F7> [list searchbar::show $finder]
355 + bind $top <Key-slash> [list searchbar::show $finder]
356 + bind $top <Control-Key-s> [list searchbar::show $finder]
357 bind $top <Escape> [list searchbar::hide $finder]
358 bind $top <F3> [list searchbar::find_next $finder]
359 + bind $top <Key-n> [list searchbar::find_next $finder]
360 bind $top <Shift-F3> [list searchbar::find_prev $finder]
361 + bind $top <Shift-Key-n> [list searchbar::find_prev $finder]
362 bind $top <Control-Key-g> [list linebar::show $gotoline]
363 catch { bind $top <Shift-Key-XF86_Switch_VT_3> [list searchbar::find_prev $finder] }
364
lib/search.tcl
+3 -1
@@ -35,6 +35,8 @@ constructor new {i_w i_text args} {
35 grid remove $w
36
37 trace add variable searchstring write [cb _incrsearch_cb]
38 + bind $w.ent <Return> [cb find_next]
39 + bind $w.ent <Shift-Return> [cb find_prev]
40
41 bind $w <Destroy> [list delete_this $this]
42 return $this
@@ -196,4 +198,4 @@ method scrolled {} {
198 }
199 }
200
199 -}
\ No newline at end of file
201 +}