summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar David Fries <david@fries.net>2011-07-16 11:59:45 -0500
committerLibravatar Pat Thoyts <patthoyts@users.sourceforge.net>2011-07-19 15:31:29 +0100
commitaf9a4625fa7aeeb5bc52eed3af7e19579af31f42 (patch)
treebba2d3cf58ffac81e860fb46f9d876f8ab281c9d
parentgit-gui: Enable jumping to a specific line number in blame view. (diff)
downloadtgif-af9a4625fa7aeeb5bc52eed3af7e19579af31f42.tar.xz
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>
-rw-r--r--lib/blame.tcl4
-rw-r--r--lib/search.tcl4
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/blame.tcl b/lib/blame.tcl
index 14fde81761..bc81e29b43 100644
--- a/lib/blame.tcl
+++ b/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/lib/search.tcl b/lib/search.tcl
index 7fdbf87bcd..ef3486f083 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 <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
+}