diff options
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/editor.rs | 3 | ||||
-rw-r--r-- | helix-view/src/tree.rs | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 52285bf8..24cd8ef9 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -54,8 +54,7 @@ impl Editor { } let view = View::new(doc)?; - let id = self.tree.insert(view); - self.tree.get_mut(id).id = id; + self.tree.insert(view); Ok(()) } diff --git a/helix-view/src/tree.rs b/helix-view/src/tree.rs index 4b6fd77c..9903ba79 100644 --- a/helix-view/src/tree.rs +++ b/helix-view/src/tree.rs @@ -99,6 +99,7 @@ impl Tree { let mut node = Node::view(view); node.parent = parent; let node = self.nodes.insert(node); + self.get_mut(node).id = node; let container = match &mut self.nodes[parent] { Node { |