mouse selection now uses character indexing (#2839)
This commit is contained in:
parent
cad4e03a00
commit
8c64c3dfa3
1 changed files with 1 additions and 1 deletions
|
@ -1046,7 +1046,7 @@ impl EditorView {
|
||||||
|
|
||||||
let mut selection = doc.selection(view.id).clone();
|
let mut selection = doc.selection(view.id).clone();
|
||||||
let primary = selection.primary_mut();
|
let primary = selection.primary_mut();
|
||||||
*primary = Range::new(primary.anchor, pos);
|
*primary = primary.put_cursor(doc.text().slice(..), pos, true);
|
||||||
doc.set_selection(view.id, selection);
|
doc.set_selection(view.id, selection);
|
||||||
EventResult::Consumed(None)
|
EventResult::Consumed(None)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue