From 9f318a852909439190050a0cd157938477f4639b Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 8 Apr 2021 16:53:57 +0900 Subject: Fix an issue with closing nested splits. The parent id was never assigned to the split, so removing the container when it became empty failed. --- helix-view/src/tree.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helix-view/src/tree.rs b/helix-view/src/tree.rs index 6204ba41..e48f376a 100644 --- a/helix-view/src/tree.rs +++ b/helix-view/src/tree.rs @@ -163,7 +163,8 @@ impl Tree { container.children.insert(pos, node); self.nodes[node].parent = parent; } else { - let split = Node::container(layout); + let mut split = Node::container(layout); + split.parent = parent; let split = self.nodes.insert(split); let container = match &mut self.nodes[split] { -- cgit v1.2.3-70-g09d2