summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2012-10-04 20:50:17 (GMT)
committerPaul Mackerras <paulus@samba.org>2012-10-21 22:24:47 (GMT)
commit978904bf16600dd21888964f3d5cabf02ba39f22 (patch)
tree54f0326cb72d477c4e1df6f377967f12373b6a9e /gitk
parentce837c9de5d67919437e1c05789b23c3aca95d4c (diff)
downloadgit-978904bf16600dd21888964f3d5cabf02ba39f22.zip
git-978904bf16600dd21888964f3d5cabf02ba39f22.tar.gz
git-978904bf16600dd21888964f3d5cabf02ba39f22.tar.bz2
gitk: When searching, only highlight files when in Patch mode
This fixes another regression that was introduced in b967135 ("gitk: Synchronize highlighting in file view when scrolling diff"): when searching for a string in tree mode, jumping to the next search hit would highlight the "Comments" entry in the file list. Signed-off-by: Stefan Haller <stefan@haller-berlin.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk13
1 files changed, 6 insertions, 7 deletions
diff --git a/gitk b/gitk
index a569c0d..bc73eea 100755
--- a/gitk
+++ b/gitk
@@ -7979,8 +7979,9 @@ proc highlightfile {cline} {
}
proc highlightfile_for_scrollpos {topidx} {
- global difffilestart
+ global cmitmode difffilestart
+ if {$cmitmode eq "tree"} return
if {![info exists difffilestart]} return
set top [lindex [split $topidx .] 0]
@@ -8204,12 +8205,10 @@ proc scrolltext {f0 f1} {
global searchstring cmitmode ctext
global suppress_highlighting_file_for_this_scrollpos
- if {$cmitmode ne "tree"} {
- set topidx [$ctext index @0,0]
- if {![info exists suppress_highlighting_file_for_this_scrollpos]
- || $topidx ne $suppress_highlighting_file_for_this_scrollpos} {
- highlightfile_for_scrollpos $topidx
- }
+ set topidx [$ctext index @0,0]
+ if {![info exists suppress_highlighting_file_for_this_scrollpos]
+ || $topidx ne $suppress_highlighting_file_for_this_scrollpos} {
+ highlightfile_for_scrollpos $topidx
}
catch {unset suppress_highlighting_file_for_this_scrollpos}