aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/selection.rs
diff options
context:
space:
mode:
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
}