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
This commit is contained in:
Wojciech Kępka 2021-06-13 11:53:35 +02:00 committed by Blaž Hrastnik
parent b9100fbd44
commit d008e86037

View File

@ -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]