diff options
author | Blaž Hrastnik | 2021-03-29 05:55:35 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-03-29 05:55:35 +0000 |
commit | a74ff6bc032a82798486b4df9fab24703bff19da (patch) | |
tree | 08ab4b38a8177592d296a1deadbb596bea9e04d5 /helix-core | |
parent | b52474cf662310b82b7dbb69cde09000b7369537 (diff) |
Transaction: need to consume insert | delete properly.
Diffstat (limited to 'helix-core')
-rw-r--r-- | helix-core/src/transaction.rs | 2 |
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 { |