on master help sign in
fix: Correctly detect empty transactions

Fixes #1221

commit119dee2980708f75150e39c19f92de029d92dad0 authorBlaž Hrastnik <blaz@mxxn.io> dateThu 2 Dec 2021, 23:49 (5 years ago) parent27ffc79
1 file changed+1−1
helix-core/src/transaction.rs+1−1
helix-core/src/transaction.rs+1−1
@@ -330,7 +330,7 @@ impl ChangeSet {
330330 /// `true` when the set is empty.
331331 #[inline]
332332 pub fn is_empty(&self) -> bool {
333− self.changes.is_empty()
333+ self.changes.is_empty() || self.changes == [Operation::Retain(self.len)]
334334 }
335335
336336 /// Map a position through the changes.