提交 096e96b4 编写于 作者: B Brian Downing 提交者: Paul Mackerras

[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: NBrian Downing <bdowning@lavos.net>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 d36d385e
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册