aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-29 05:55:35 +0000
committerBlaž Hrastnik2021-03-29 05:55:35 +0000
commita74ff6bc032a82798486b4df9fab24703bff19da (patch)
tree08ab4b38a8177592d296a1deadbb596bea9e04d5
parentb52474cf662310b82b7dbb69cde09000b7369537 (diff)
Transaction: need to consume insert | delete properly.
-rw-r--r--helix-core/src/transaction.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs
index aaf912dd..7da5b7dd 100644
--- a/helix-core/src/transaction.rs
+++ b/helix-core/src/transaction.rs
@@ -350,6 +350,8 @@ impl ChangeSet {
// a subsequent delete means a replace, consume it
if let Some(Delete(len)) = iter.peek() {
+ iter.next();
+
old_end = old_pos + len;
// in range of replaced text
if old_end > pos {