diff options
author | Blaž Hrastnik | 2021-04-08 07:53:57 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-04-08 13:34:06 +0000 |
commit | 9f318a852909439190050a0cd157938477f4639b (patch) | |
tree | 77e6712c0a90d75cea43eb164a331d39530287ea /helix-view/src | |
parent | 9ca2909c80ff95b1dd4a1d92b7144d7bbfce3ca6 (diff) |
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.
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/tree.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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] { |