Skip to content

Commit

Permalink
Fix off-by-one in select symbol references (helix-editor#7132)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoohey31 authored and aotarola committed May 28, 2023
1 parent 0bab219 commit 54f61e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-term/src/commands/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 54f61e6

Please sign in to comment.