From 096e96b493bfc30687c87b303b93e75864942786 Mon Sep 17 00:00:00 2001 From: Brian Downing Date: Thu, 5 Jul 2007 06:33:02 -0500 Subject: [PATCH] [PATCH] gitk: Fix for tree view ending in nested directories Unroll the prefix stack when assigning treeheights when leaving proc treeview. Previously, when the ls-tree output ended in multiple nested directories (for instance in a repository with a single file "foo/bar/baz"), $treeheight("foo/bar/") was assigned twice, and $treeheight("foo/") was never assigned. This led to an error when expanding the "foo" directory in the gitk treeview. Signed-off-by: Brian Downing Signed-off-by: Paul Mackerras --- gitk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gitk b/gitk index 45e16e4fd..28a6bac3a 100755 --- a/gitk +++ b/gitk @@ -1216,6 +1216,9 @@ proc treeview {w l openlevs} { set treeheight($prefix) $ht incr ht [lindex $htstack end] set htstack [lreplace $htstack end end] + set prefixend [lindex $prefendstack end] + set prefendstack [lreplace $prefendstack end end] + set prefix [string range $prefix 0 $prefixend] } $w conf -state disabled } -- 2.26.2