summaryrefslogtreecommitdiff
path: root/helix-core/src/transaction.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-10-25 02:01:21 +0000
committerBlaž Hrastnik2021-10-25 02:09:09 +0000
commitbfb6cff5a9b0ff5c37085086f895d3f14eaa5782 (patch)
tree2fc47587436186517a4bdba47a87babf58f7195c /helix-core/src/transaction.rs
parentd4d16ca1b06ed18843ec3382f485c09b04e35e18 (diff)
fix: Compose where changes.compose(empty_other)
Diffstat (limited to 'helix-core/src/transaction.rs')
-rw-r--r--helix-core/src/transaction.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs
index d682f058..0e49fbe3 100644
--- a/helix-core/src/transaction.rs
+++ b/helix-core/src/transaction.rs
@@ -132,6 +132,9 @@ impl ChangeSet {
if self.changes.is_empty() {
return other;
}
+ if other.changes.is_empty() {
+ return self;
+ }
let len = self.changes.len();