{"thread":{"id":"16547","subject":"[PATCH] gitk: map / to focus the search box","startedAt":"2008-12-02T01:18:56Z","lastAt":"2008-12-02T01:18:56Z","messageCount":1,"participants":["Giuseppe Bilotta"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"96894","messageId":"1228180736-15707-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"16547","inReplyTo":null,"subject":"[PATCH] gitk: map / to focus the search box","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2008-12-02T01:18:56Z","receivedAt":"2008-12-02T01:18:56Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"The / key is often used to initiate searches (less, vim, some web\nbrowsers). We change the binding for the / (slash) key from 'find next'\nto 'focus the search box' to follow this convention.\n\nSigned-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n---\n\nLike this?\n\n gitk-git/gitk |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 6b671a6..0c0350b 100644\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -2271,7 +2271,7 @@ proc makewindow {} {\n     bindkey b prevfile\n     bindkey d \"$ctext yview scroll 18 units\"\n     bindkey u \"$ctext yview scroll -18 units\"\n-    bindkey / {dofind 1 1}\n+    bindkey / {focus $fstring}\n     bindkey <Key-Return> {dofind 1 1}\n     bindkey ? {dofind -1 1}\n     bindkey f nextfile\n@@ -2652,7 +2652,7 @@ proc keys {} {\n [mc \"<%s-F>\t\tFind\" $M1T]\n [mc \"<%s-G>\t\tMove to next find hit\" $M1T]\n [mc \"<Return>\tMove to next find hit\"]\n-[mc \"/\t\tMove to next find hit, or redo find\"]\n+[mc \"/\t\tFocus the search box\"]\n [mc \"?\t\tMove to previous find hit\"]\n [mc \"f\t\tScroll diff view to next file\"]\n [mc \"<%s-S>\t\tSearch for next hit in diff view\" $M1T]\n-- \n1.5.6.5\n"}]}