From b0b5451c389b0d893cef4b30df8982a32d22bc9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Tue, 16 Feb 2021 11:09:05 +0900 Subject: [PATCH] Since insert preceedes deletes, follow that ordering in Transaction::changes. Produces the same output but will take the happy path. --- helix-core/src/transaction.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs index 359eb2ee4..9cb517185 100644 --- a/helix-core/src/transaction.rs +++ b/helix-core/src/transaction.rs @@ -477,8 +477,8 @@ impl Transaction { let span = to - from; match tendril { Some(text) => { - changeset.delete(span); changeset.insert(text); + changeset.delete(span); } None => changeset.delete(span), }