Transaction: need to consume insert | delete properly.
commita74ff6bc032a82798486b4df9fab24703bff19da
authorBlaž Hrastnik <blaz@mxxn.io>
dateMon 29 Mar 2021, 14:55 (6 years ago)
parentb52474c
helix-core/src/transaction.rs+2
@@ -350,6 +350,8 @@ impl ChangeSet {
350350
351351 // a subsequent delete means a replace, consume it
352352 if let Some(Delete(len)) = iter.peek() {
353+ iter.next();
354+
353355 old_end = old_pos + len;
354356 // in range of replaced text
355357 if old_end > pos {