Skip to content

Commit

Permalink
mouse selection now uses character indexing (#2839)
Browse files Browse the repository at this point in the history
  • Loading branch information
k2d222 authored Jun 20, 2022
1 parent cad4e03 commit 8c64c3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-term/src/ui/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 8c64c3d

Please sign in to comment.