Skip to content

Commit 97bed03

Browse files
Oblomovpaulusmack
authored andcommitted
gitk: Map / to focus the search box
The / key is often used to initiate searches (less, vim, some web browsers). This changes the binding for the / (slash) key from 'find next' to 'focus the search box' to follow this convention. Signed-off-by: Giuseppe Bilotta <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent 9712b81 commit 97bed03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2279,7 +2279,7 @@ proc makewindow {} {
22792279
bindkey b prevfile
22802280
bindkey d "$ctext yview scroll 18 units"
22812281
bindkey u "$ctext yview scroll -18 units"
2282-
bindkey / {dofind 1 1}
2282+
bindkey / {focus $fstring}
22832283
bindkey <Key-Return> {dofind 1 1}
22842284
bindkey ? {dofind -1 1}
22852285
bindkey f nextfile
@@ -2660,7 +2660,7 @@ proc keys {} {
26602660
[mc "<%s-F> Find" $M1T]
26612661
[mc "<%s-G> Move to next find hit" $M1T]
26622662
[mc "<Return> Move to next find hit"]
2663-
[mc "/ Move to next find hit, or redo find"]
2663+
[mc "/ Focus the search box"]
26642664
[mc "? Move to previous find hit"]
26652665
[mc "f Scroll diff view to next file"]
26662666
[mc "<%s-S> Search for next hit in diff view" $M1T]

0 commit comments

Comments
 (0)