on master help sign in
fix: Correctly detect empty transactions
119dee2Blaž Hrastnik
helix-core/src/transaction.rs+1−1
@@ -330,7 +330,7 @@ impl ChangeSet {
330 /// `true` when the set is empty.
330 /// `true` when the set is empty.
331 #[inline]
331 #[inline]
332 pub fn is_empty(&self) -> bool {
332 pub fn is_empty(&self) -> bool {
333− self.changes.is_empty()
333+ self.changes.is_empty() || self.changes == [Operation::Retain(self.len)]
334 }
334 }
335
335
336 /// Map a position through the changes.
336 /// Map a position through the changes.