mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
Fix off-by-one in select symbol references (#7132)
This commit is contained in:
parent
8e2660b5cc
commit
207829eefe
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user