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>
This commit is contained in:
Stefan Haller 2012-10-04 22:50:16 +02:00 committed by Paul Mackerras
parent 62e9ac5edf
commit ce837c9de5

2
gitk
View File

@ -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