Skip to content

Commit

Permalink
gitk: Fix error message when clicking on a connecting line
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Haller authored and Paul Mackerras committed Oct 21, 2012
1 parent 62e9ac5 commit ce837c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce837c9

Please sign in to comment.