aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
authorCossonLeo2021-11-08 15:17:54 +0000
committerGitHub2021-11-08 15:17:54 +0000
commit29e684941389f949491efe4d9807a0edd1facee3 (patch)
tree118f252ae10aff36a91361c16aef4b33c6aac2b2 /helix-view/src
parentbf4c70e02739601b7657c69a3876f9d1090a42c0 (diff)
Add LSP rename_symbol (space-r) (#1011)
improve apply_workspace_edit
Diffstat (limited to 'helix-view/src')
-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 => {