git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Stefan Haller <stefan@haller-berlin.de>
To: Paul Mackerras <paulus@samba.org>
Cc: Johannes Sixt <j.sixt@viscovery.net>, git@vger.kernel.org
Subject: [PATCH 1/2] gitk: Fix error message when clicking on a connecting line
Date: Thu,  4 Oct 2012 22:50:16 +0200	[thread overview]
Message-ID: <1349383817-14457-2-git-send-email-stefan@haller-berlin.de> (raw)
In-Reply-To: <1349383817-14457-1-git-send-email-stefan@haller-berlin.de>

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>
---
 gitk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gitk b/gitk
index 379582a..8935284 100755
--- a/gitk
+++ b/gitk
@@ -7958,6 +7958,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
-- 
1.8.0.rc0.36.gef0f079

  reply	other threads:[~2012-10-04 22:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01  8:40 [BUG] gitk: clicking on a connecting line produces can't read "cflist_top" Johannes Sixt
2012-10-04 20:50 ` Stefan Haller
2012-10-04 20:50   ` Stefan Haller [this message]
2012-10-04 20:50   ` [PATCH 2/2] gitk: When searching, only highlight files when in Patch mode Stefan Haller
2012-10-21 22:25   ` [BUG] gitk: clicking on a connecting line produces can't read "cflist_top" Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1349383817-14457-2-git-send-email-stefan@haller-berlin.de \
    --to=stefan@haller-berlin.de \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).