Fix off-by-one in select symbol references (#7132)
This commit is contained in:
parent
8e2660b5cc
commit
207829eefe
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue