Fix handling of new files with new buffer/file structure

This commit is contained in:
Max Brunsfeld
2021-05-06 21:06:20 -07:00
parent 290fcb4c06
commit e6323f0d02
4 changed files with 51 additions and 78 deletions
+3 -1
View File
@@ -484,7 +484,9 @@ impl Buffer {
file: Option<FileHandle>,
ctx: &mut ModelContext<Buffer>,
) {
self.file = file;
if file.is_some() {
self.file = file;
}
self.saved_version = version;
ctx.emit(Event::Saved);
}