Skip to contentSkip to conversation

gitk: Fix a bug in collapsing deeply nested trees.

PATCH New Alexander Gavrilov 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gitk: Fix a bug in collapsing deeply nested trees.

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.

---
 gitk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
gitk +1 -1
index dbc6064..989a3f7 100755
@@ -2705,7 +2705,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]
Signature · 1 line
1.6.0.20.g6148bc