`Document::is_modified` should not check if path is set
If there is a new document we still want to know if there are unsaved changes
commitd008e860379df590cd2a948ec490351ed30ca5b1
authorWojciech Kępka <wojtek.kepka@protonmail.com>
dateSun 13 Jun 2021, 11:53 (5 years ago)
parentb9100fb
helix-view/src/document.rs+1−2
@@ -462,8 +462,7 @@ impl Document {
462462 let history = self.history.take();
463463 let current_revision = history.current_revision();
464464 self.history.set(history);
465− self.path.is_some()
466− && (current_revision != self.last_saved_revision || !self.changes.is_empty())
465+ current_revision != self.last_saved_revision || !self.changes.is_empty()
467466 }
468467
469468 #[inline]