diff options
author | Blaž Hrastnik | 2021-12-02 14:49:54 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-12-02 14:49:54 +0000 |
commit | 119dee2980708f75150e39c19f92de029d92dad0 (patch) | |
tree | d07b840a5f9f0aa1fc30e0e6c469b586224b155b /helix-core | |
parent | 27ffc79c44710a18ca93cb2f0e91ee18ea19f98d (diff) |
fix: Correctly detect empty transactions
Fixes #1221
Diffstat (limited to 'helix-core')
-rw-r--r-- | helix-core/src/transaction.rs | 2 |
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. |