on master help sign in
mouse selection now uses character indexing (#2839)
commit8c64c3dfa3be911344ae0acaeee8018ffccde643 authorMathis Brossier <mathis.brossier@gmail.com> dateMon 20 Jun 2022, 20:41 (4 years ago) parentcad4e03
1 file changed+1−1
helix-term/src/ui/editor.rs+1−1
helix-term/src/ui/editor.rs+1−1
@@ -1046,7 +1046,7 @@ impl EditorView {
10461046
10471047 let mut selection = doc.selection(view.id).clone();
10481048 let primary = selection.primary_mut();
1049− *primary = Range::new(primary.anchor, pos);
1049+ *primary = primary.put_cursor(doc.text().slice(..), pos, true);
10501050 doc.set_selection(view.id, selection);
10511051 EventResult::Consumed(None)
10521052 }