aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-12-02 14:49:54 +0000
committerBlaž Hrastnik2021-12-02 14:49:54 +0000
commit119dee2980708f75150e39c19f92de029d92dad0 (patch)
treed07b840a5f9f0aa1fc30e0e6c469b586224b155b /helix-core/src
parent27ffc79c44710a18ca93cb2f0e91ee18ea19f98d (diff)
fix: Correctly detect empty transactions
Fixes #1221
Diffstat (limited to 'helix-core/src')
-rw-r--r--helix-core/src/transaction.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs
index dfc18fbe..9c07be2c 100644
--- a/helix-core/src/transaction.rs
+++ b/helix-core/src/transaction.rs
@@ -330,7 +330,7 @@ impl ChangeSet {
/// `true` when the set is empty.
#[inline]
pub fn is_empty(&self) -> bool {
- self.changes.is_empty()
+ self.changes.is_empty() || self.changes == [Operation::Retain(self.len)]
}
/// Map a position through the changes.