summaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/editor.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 17cd3d7b..631dcf0c 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -287,6 +287,12 @@ impl Editor {
return;
}
Action::Load => {
+ let view_id = view!(self).id;
+ if let Some(doc) = self.document_mut(id) {
+ if doc.selections().is_empty() {
+ doc.selections.insert(view_id, Selection::point(0));
+ }
+ }
return;
}
Action::HorizontalSplit => {