git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitk: map / to focus the search box
@ 2008-11-23 17:01 Giuseppe Bilotta
  2008-12-01 22:33 ` Paul Mackerras
  0 siblings, 1 reply; 4+ messages in thread
From: Giuseppe Bilotta @ 2008-11-23 17:01 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras, Junio C Hamano, Giuseppe Bilotta

The / key is often used to initiate searches (less, vim, some web
browsers). We change the binding for the / (slash) key from 'find next'
to 'focus the search box' to follow this convention.
---
 gitk-git/gitk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index 6b671a6..8b60632 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -2271,7 +2271,7 @@ proc makewindow {} {
     bindkey b prevfile
     bindkey d "$ctext yview scroll 18 units"
     bindkey u "$ctext yview scroll -18 units"
-    bindkey / {dofind 1 1}
+    bindkey / {focus $fstring}
     bindkey <Key-Return> {dofind 1 1}
     bindkey ? {dofind -1 1}
     bindkey f nextfile
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] gitk: map / to focus the search box
@ 2008-12-02  1:18 Giuseppe Bilotta
  0 siblings, 0 replies; 4+ messages in thread
From: Giuseppe Bilotta @ 2008-12-02  1:18 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Giuseppe Bilotta

The / key is often used to initiate searches (less, vim, some web
browsers). We change the binding for the / (slash) key from 'find next'
to 'focus the search box' to follow this convention.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---

Like this?

 gitk-git/gitk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index 6b671a6..0c0350b 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -2271,7 +2271,7 @@ proc makewindow {} {
     bindkey b prevfile
     bindkey d "$ctext yview scroll 18 units"
     bindkey u "$ctext yview scroll -18 units"
-    bindkey / {dofind 1 1}
+    bindkey / {focus $fstring}
     bindkey <Key-Return> {dofind 1 1}
     bindkey ? {dofind -1 1}
     bindkey f nextfile
@@ -2652,7 +2652,7 @@ proc keys {} {
 [mc "<%s-F>		Find" $M1T]
 [mc "<%s-G>		Move to next find hit" $M1T]
 [mc "<Return>	Move to next find hit"]
-[mc "/		Move to next find hit, or redo find"]
+[mc "/		Focus the search box"]
 [mc "?		Move to previous find hit"]
 [mc "f		Scroll diff view to next file"]
 [mc "<%s-S>		Search for next hit in diff view" $M1T]
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-02  1:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-23 17:01 [PATCH] gitk: map / to focus the search box Giuseppe Bilotta
2008-12-01 22:33 ` Paul Mackerras
2008-12-02  1:19   ` Giuseppe Bilotta
  -- strict thread matches above, loose matches on Subject: below --
2008-12-02  1:18 Giuseppe Bilotta

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).