Unnamed repository; edit this file 'description' to name the repository.
fix: Compose where changes.compose(empty_other)
Blaž Hrastnik 2021-10-25
parent d4d16ca · commit bfb6cff
-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();