{"thread":{"id":"16432","subject":"[PATCH] gitk: map / to focus the search box","startedAt":"2008-11-23T17:01:30Z","lastAt":"2008-12-02T01:19:22Z","messageCount":3,"participants":["Giuseppe Bilotta","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"96381","messageId":"1227459690-9896-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"16432","inReplyTo":null,"subject":"[PATCH] gitk: map / to focus the search box","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2008-11-23T17:01:30Z","receivedAt":"2008-11-23T17:01:30Z","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---\n gitk-git/gitk |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 6b671a6..8b60632 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-- \n1.5.6.5\n"},{"id":"96889","messageId":"18740.26151.55900.953153@cargo.ozlabs.ibm.com","threadId":"16432","inReplyTo":"1227459690-9896-1-git-send-email-giuseppe.bilotta@gmail.com","subject":"Re: [PATCH] gitk: map / to focus the search box","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2008-12-01T22:33:11Z","receivedAt":"2008-12-01T22:33:11Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Giuseppe Bilotta writes:\n\n> The / key is often used to initiate searches (less, vim, some web\n> browsers). We change the binding for the / (slash) key from 'find next'\n> to 'focus the search box' to follow this convention.\n\nI think that's reasonable, but the patch needs to update the key\nbindings help text as well.\n\nThanks,\nPaul.\n"},{"id":"96895","messageId":"1228180762-15739-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"16432","inReplyTo":"18740.26151.55900.953153@cargo.ozlabs.ibm.com","subject":"[PATCH] gitk: map / to focus the search box","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2008-12-02T01:19:22Z","receivedAt":"2008-12-02T01:19:22Z","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"}]}