on master help sign in
Fix off-by-one in select symbol references (#7132)
commit207829eefee51095d1c7b424cf11cab694fbf52b authorMatthew Toohey <contact@mtoohey.com> dateThu 25 May 2023, 08:01 (3 years ago) parent8e2660b
1 file changed+1−1
helix-term/src/commands/lsp.rs+1−1
helix-term/src/commands/lsp.rs+1−1
@@ -1484,7 +1484,7 @@ pub fn select_references_to_symbol_under_cursor(cx: &mut Context) {
14841484 };
14851485 let (view, doc) = current!(editor);
14861486 let text = doc.text();
1487− let pos = doc.selection(view.id).primary().head;
1487+ let pos = doc.selection(view.id).primary().cursor(text.slice(..));
14881488
14891489 // We must find the range that contains our primary cursor to prevent our primary cursor to move
14901490 let mut primary_index = 0;