From: David Fries <david@fries.net>
To: git@vger.kernel.org
Cc: Paul Mackerras <paulus@samba.org>
Subject: [PATCH 2/2] git-gui blame add more common search hotkeys
Date: Sat, 16 Jul 2011 11:59:45 -0500 [thread overview]
Message-ID: <20110716165945.GA9722@spacedout.fries.net> (raw)
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 reply other threads:[~2011-07-16 17:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-16 16:59 David Fries [this message]
2011-07-19 14:35 ` [PATCH 2/2] git-gui blame add more common search hotkeys Pat Thoyts
2011-07-20 2:56 ` David Fries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110716165945.GA9722@spacedout.fries.net \
--to=david@fries.net \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).