aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
authorWojciech Kępka2021-06-13 09:53:35 +0000
committerBlaž Hrastnik2021-06-13 11:48:18 +0000
commitd008e860379df590cd2a948ec490351ed30ca5b1 (patch)
tree054ba49fcbb98503d1c6e1712c159ab306a0e6f1 /helix-view
parentb9100fbd44ee91d099ac95db3d0503dfcad80cff (diff)
`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
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/document.rs3
1 files changed, 1 insertions, 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]