aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/selection.rs
diff options
context:
space:
mode:
authorNathan Vegdahl2021-07-21 01:15:34 +0000
committerNathan Vegdahl2021-07-21 01:15:34 +0000
commitc848ed7abc7605c1bb1c6c98dfac23cadcb9e439 (patch)
treee9b9f40a74180de5ab1f3d21dfc5a9ebe3b310d8 /helix-core/src/selection.rs
parentd5534a6d10dacf6fc48e4891781038be278ca744 (diff)
Fixes for misc bugs with view movement.
Diffstat (limited to 'helix-core/src/selection.rs')
-rw-r--r--helix-core/src/selection.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs
index 074b6199..beade27a 100644
--- a/helix-core/src/selection.rs
+++ b/helix-core/src/selection.rs
@@ -286,7 +286,7 @@ impl Selection {
// For 1-width cursor semantics.
if range.anchor < range.head {
- prev_grapheme_boundary(text, range.head)
+ prev_grapheme_boundary(text, range.head).max(range.anchor)
} else {
range.head
}