From d008e860379df590cd2a948ec490351ed30ca5b1 Mon Sep 17 00:00:00 2001 From: Wojciech Kępka Date: Sun, 13 Jun 2021 11:53:35 +0200 Subject: `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 --- helix-view/src/document.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 75a0e9fa..e4475938 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -462,8 +462,7 @@ impl Document { let history = self.history.take(); let current_revision = history.current_revision(); self.history.set(history); - self.path.is_some() - && (current_revision != self.last_saved_revision || !self.changes.is_empty()) + current_revision != self.last_saved_revision || !self.changes.is_empty() } #[inline] -- cgit v1.2.3-70-g09d2