summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2012-10-04 20:50:16 (GMT)
committerPaul Mackerras <paulus@samba.org>2012-10-21 22:24:46 (GMT)
commitce837c9de5d67919437e1c05789b23c3aca95d4c (patch)
tree2d3593e4e7c7c5d46a5067f42be0ec8a6e3ad059 /gitk
parent62e9ac5edfd7d9f24482ce767eec4b1ac96db4a4 (diff)
downloadgit-ce837c9de5d67919437e1c05789b23c3aca95d4c.zip
git-ce837c9de5d67919437e1c05789b23c3aca95d4c.tar.gz
git-ce837c9de5d67919437e1c05789b23c3aca95d4c.tar.bz2
gitk: Fix error message when clicking on a connecting line
When clicking on the line that connects two commit nodes, gitk would bring up an error dialog saying "can't read "cflist_top": no such variable". This fixes a regression that was introduced with b967135 ("gitk: Synchronize highlighting in file view when scrolling diff"). Signed-off-by: Stefan Haller <stefan@haller-berlin.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk2
1 files changed, 2 insertions, 0 deletions
diff --git a/gitk b/gitk
index 54cffde..a569c0d 100755
--- a/gitk
+++ b/gitk
@@ -7970,6 +7970,8 @@ proc changediffdisp {} {
proc highlightfile {cline} {
global cflist cflist_top
+ if {![info exists cflist_top]} return
+
$cflist tag remove highlight $cflist_top.0 "$cflist_top.0 lineend"
$cflist tag add highlight $cline.0 "$cline.0 lineend"
$cflist see $cline.0