git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] gitk: Fix error message when clicking on a connecting line

From
Stefan Haller <stefan@haller-berlin.de>
Date
Oct 4, 2012, 20:50 UTC
Message-ID
<1349383817-14457-2-git-send-email-stefan@haller-berlin.de>
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
Previous: Stefan HallerNext: Stefan Haller
Message 3 of 5 in “[BUG] gitk: clicking on a connecting line produces can't read "cflist_top"”
  1. Johannes SixtOct 1, 2012
  2. Stefan HallerOct 4, 2012
  3. 1/2 gitk: Fix error message when clicking on a connecting lineStefan Haller, Oct 4, 2012
  4. 2/2 gitk: When searching, only highlight files when in Patch modeStefan Haller, Oct 4, 2012
  5. Paul MackerrasOct 21, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.