aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/selection.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-09-05 13:01:05 +0000
committerBlaž Hrastnik2020-09-07 02:21:26 +0000
commit579b6899f1fe7f0a06857c4528f55f316e2975e9 (patch)
tree1b850ba7f2abc1698763fc55cf7eebdad0fe9c8f /helix-core/src/selection.rs
parente806446379db3f5c7e3bc6fd823ddd6969ed6f32 (diff)
Work on insert mode.
Diffstat (limited to 'helix-core/src/selection.rs')
-rw-r--r--helix-core/src/selection.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs
index 3e28c9ce..1c0b6b74 100644
--- a/helix-core/src/selection.rs
+++ b/helix-core/src/selection.rs
@@ -63,8 +63,8 @@ impl Range {
/// Map a range through a set of changes. Returns a new range representing the same position
/// after the changes are applied.
pub fn map(self, changes: &ChangeSet) -> Self {
- let anchor = changes.map_pos(self.anchor, Assoc::Before);
- let head = changes.map_pos(self.head, Assoc::Before);
+ let anchor = changes.map_pos(self.anchor, Assoc::After);
+ let head = changes.map_pos(self.head, Assoc::After);
// TODO: possibly unnecessary
if self.anchor == anchor && self.head == head {