From a74ff6bc032a82798486b4df9fab24703bff19da Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Mon, 29 Mar 2021 14:55:35 +0900 Subject: Transaction: need to consume insert | delete properly. --- helix-core/src/transaction.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'helix-core/src') 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 { -- cgit v1.2.3-70-g09d2