aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 4df3278b..d44f477b 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -3651,7 +3651,7 @@ pub mod insert {
(pos, pos, local_offs)
};
- let new_range = if doc.restore_cursor {
+ let new_range = if range.cursor(text) > range.anchor {
// when appending, extend the range by local_offs
Range::new(
range.anchor + global_offs,