on master help sign in
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.

commit9f318a852909439190050a0cd157938477f4639b authorBlaž Hrastnik <blaz@mxxn.io> dateThu 8 Apr 2021, 16:53 (6 years ago) parent9ca2909
1 file changed+2−1
helix-view/src/tree.rs+2−1
helix-view/src/tree.rs+2−1
@@ -163,7 +163,8 @@ impl Tree {
163163 container.children.insert(pos, node);
164164 self.nodes[node].parent = parent;
165165 } else {
166− let split = Node::container(layout);
166+ let mut split = Node::container(layout);
167+ split.parent = parent;
167168 let split = self.nodes.insert(split);
168169
169170 let container = match &mut self.nodes[split] {