aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/tree.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/tree.rs')
-rw-r--r--helix-view/src/tree.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/helix-view/src/tree.rs b/helix-view/src/tree.rs
index 064334b1..de5046ac 100644
--- a/helix-view/src/tree.rs
+++ b/helix-view/src/tree.rs
@@ -314,6 +314,9 @@ impl Tree {
pub fn recalculate(&mut self) {
if self.is_empty() {
+ // There are no more views, so the tree should focus itself again.
+ self.focus = self.root;
+
return;
}