summaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index fd0abe91..005c6667 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -1176,6 +1176,7 @@ impl Editor {
let doc = doc_mut!(self, &doc_id);
doc.ensure_view_init(view.id);
view.sync_changes(doc);
+ doc.mark_as_focused();
align_view(doc, view, Align::Center);
}
@@ -1246,6 +1247,7 @@ impl Editor {
let view_id = view!(self).id;
let doc = doc_mut!(self, &id);
doc.ensure_view_init(view_id);
+ doc.mark_as_focused();
return;
}
Action::HorizontalSplit | Action::VerticalSplit => {
@@ -1267,6 +1269,7 @@ impl Editor {
// initialize selection for view
let doc = doc_mut!(self, &id);
doc.ensure_view_init(view_id);
+ doc.mark_as_focused();
}
}
@@ -1417,6 +1420,7 @@ impl Editor {
let view_id = self.tree.insert(view);
let doc = doc_mut!(self, &doc_id);
doc.ensure_view_init(view_id);
+ doc.mark_as_focused();
}
self._refresh();
@@ -1471,6 +1475,10 @@ impl Editor {
view.sync_changes(doc);
}
}
+
+ let view = view!(self, view_id);
+ let doc = doc_mut!(self, &view.doc);
+ doc.mark_as_focused();
}
pub fn focus_next(&mut self) {