`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
imgbot
Wojciech Kępka 4 years ago committed by Blaž Hrastnik
parent b9100fbd44
commit d008e86037

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

Loading…
Cancel
Save