summaryrefslogtreecommitdiff
path: root/helix-term/src/commands
diff options
context:
space:
mode:
authorMatthew Toohey2023-05-25 12:01:56 +0000
committerGitHub2023-05-25 12:01:56 +0000
commit207829eefee51095d1c7b424cf11cab694fbf52b (patch)
tree26b1618e1c9683845414d91809bf116006e7eb51 /helix-term/src/commands
parent8e2660b5cc86266f90926aefe1470f48c801f8bc (diff)
Fix off-by-one in select symbol references (#7132)
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r--helix-term/src/commands/lsp.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index 948f3484..3596df45 100644
--- a/helix-term/src/commands/lsp.rs
+++ b/helix-term/src/commands/lsp.rs
@@ -1484,7 +1484,7 @@ pub fn select_references_to_symbol_under_cursor(cx: &mut Context) {
};
let (view, doc) = current!(editor);
let text = doc.text();
- let pos = doc.selection(view.id).primary().head;
+ let pos = doc.selection(view.id).primary().cursor(text.slice(..));
// We must find the range that contains our primary cursor to prevent our primary cursor to move
let mut primary_index = 0;