gitk: Highlight first search result immediately on incremental search

When typing in the "Search" field, select the current search result (so that it gets highlighted in orange). This makes it easier to understand what will happen if you then type Ctrl-S. Signed-off-by: Stefan Haller <stefan@haller-berlin.de> Signed-off-by: Paul Mackerras <paulus@samba.org>

Stefan Haller committed Sep 22, 2012 at 09:40 UTC 30441a6f2d5459efa8b64332dfc3a95662a1648a
1 file changed +4 -1
gitk
+4 -1
@@ -8053,9 +8053,12 @@ proc incrsearch {name ix op} {
8053 }
8054 }
8055 if {$searchstring ne {}} {
8056 - set here [$ctext search $searchdirn -- $searchstring anchor]
8056 + set here [$ctext search -count mlen $searchdirn -- $searchstring anchor]
8057 if {$here ne {}} {
8058 $ctext see $here
8059 + set mend "$here + $mlen c"
8060 + $ctext tag remove sel 1.0 end
8061 + $ctext tag add sel $here $mend
8062 suppress_highlighting_file_for_current_scrollpos
8063 highlightfile_for_scrollpos $here
8064 }