aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorMathis Brossier2022-06-20 18:41:34 +0000
committerGitHub2022-06-20 18:41:34 +0000
commit8c64c3dfa3be911344ae0acaeee8018ffccde643 (patch)
tree1b04c43677c6a7b3596d00102b82a5e6d1a41eae /helix-term/src/ui
parentcad4e03a00d6431ccde76a080de2a5b328d54d9d (diff)
mouse selection now uses character indexing (#2839)
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/editor.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index f074d9f1..192fa180 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -1046,7 +1046,7 @@ impl EditorView {
let mut selection = doc.selection(view.id).clone();
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);
EventResult::Consumed(None)
}