mouse selection now uses character indexing (#2839)

pull/2843/head
Mathis Brossier 2 years ago committed by GitHub
parent cad4e03a00
commit 8c64c3dfa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save