gitk: Fix a bug in collapsing deeply nested trees
authorAlexander Gavrilov <angavrilov@gmail.com>
Mon, 8 Sep 2008 07:28:16 +0000 (11:28 +0400)
committerPaul Mackerras <paulus@samba.org>
Sun, 21 Sep 2008 23:13:10 +0000 (18:13 -0500)
To reproduce: expand a tree like this, then collapse A:

+A
 +B
   C
   D

The result is:

-A
   C
   D

I.e. sub-nodes expanded from the last sub-node of the item
being collapsed are not removed.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk

diff --git a/gitk b/gitk
index e61e68b88a869b990b5fa3571cd72f463771ac87..b09723007947e57eacb9c2e68af15e64a0f0fc15 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -2706,7 +2706,7 @@ proc treeopendir {w dir} {
            $w insert e:$ix $e [highlight_tag $de]
        }
     }
-    $w mark gravity e:$ix left
+    $w mark gravity e:$ix right
     $w conf -state disabled
     set treediropen($dir) 1
     set top [lindex [split [$w index @0,0] .] 0]