Skip to content

Commit ce837c9

Browse files
stefanhallerpaulusmack
authored andcommitted
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent 62e9ac5 commit ce837c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gitk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7970,6 +7970,8 @@ proc changediffdisp {} {
79707970
proc highlightfile {cline} {
79717971
global cflist cflist_top
79727972

7973+
if {![info exists cflist_top]} return
7974+
79737975
$cflist tag remove highlight $cflist_top.0 "$cflist_top.0 lineend"
79747976
$cflist tag add highlight $cline.0 "$cline.0 lineend"
79757977
$cflist see $cline.0

0 commit comments

Comments
 (0)