Only send UpdateBufferFile messages for buffers whose files have changed
Send that message when saving a buffer as a new path.
This commit is contained in:
parent
cdf64b6cad
commit
56b7eb6b6f
4 changed files with 43 additions and 36 deletions
|
@ -549,16 +549,11 @@ impl Buffer {
|
|||
version: clock::Global,
|
||||
fingerprint: RopeFingerprint,
|
||||
mtime: SystemTime,
|
||||
new_file: Option<Arc<dyn File>>,
|
||||
cx: &mut ModelContext<Self>,
|
||||
) {
|
||||
self.saved_version = version;
|
||||
self.saved_version_fingerprint = fingerprint;
|
||||
self.saved_mtime = mtime;
|
||||
if let Some(new_file) = new_file {
|
||||
self.file = Some(new_file);
|
||||
self.file_update_count += 1;
|
||||
}
|
||||
cx.emit(Event::Saved);
|
||||
cx.notify();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue