diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2012-09-22 09:40:25 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2012-09-23 15:03:18 +1000 |
commit | 30441a6f2d5459efa8b64332dfc3a95662a1648a (patch) | |
tree | 801f8f38c46038b9830c7a84db2274d668a777f8 /gitk | |
parent | c46149942adad1e8869cb795cc044581f2de314a (diff) | |
download | git-30441a6f2d5459efa8b64332dfc3a95662a1648a.tar.gz git-30441a6f2d5459efa8b64332dfc3a95662a1648a.tar.xz |
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>
Diffstat (limited to 'gitk')
-rwxr-xr-x | gitk | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -8053,9 +8053,12 @@ proc incrsearch {name ix op} { } } if {$searchstring ne {}} { - set here [$ctext search $searchdirn -- $searchstring anchor] + set here [$ctext search -count mlen $searchdirn -- $searchstring anchor] if {$here ne {}} { $ctext see $here + set mend "$here + $mlen c" + $ctext tag remove sel 1.0 end + $ctext tag add sel $here $mend suppress_highlighting_file_for_current_scrollpos highlightfile_for_scrollpos $here } |