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>
Stefan Haller committed
Oct 4, 2012 at 22:50 UTC
ce837c9de5d67919437e1c05789b23c3aca95d4c
1 file changed
+2
gitk
+2
@@ -7970,6 +7970,8 @@ proc changediffdisp {} {
7970
proc highlightfile {cline} {
7971
global cflist cflist_top
7972
7973
+ if {![info exists cflist_top]} return
7974
+
7975
$cflist tag remove highlight $cflist_top.0 "$cflist_top.0 lineend"
7976
$cflist tag add highlight $cline.0 "$cline.0 lineend"
7977
$cflist see $cline.0