Fix incorrect last modified behavior (#1621)

Looks like it checked the wrong doc id when setting last modified doc.
pull/1626/head
Ivan Tham 3 years ago committed by GitHub
parent 6ea477ab60
commit 6c11708fb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -442,7 +442,7 @@ impl Editor {
view.last_accessed_doc = Some(view.doc); view.last_accessed_doc = Some(view.doc);
// Set last modified doc if modified and last modified doc is different // Set last modified doc if modified and last modified doc is different
if std::mem::take(&mut doc.modified_since_accessed) if std::mem::take(&mut doc.modified_since_accessed)
&& view.last_modified_docs[0] != Some(id) && view.last_modified_docs[0] != Some(view.doc)
{ {
view.last_modified_docs = [Some(view.doc), view.last_modified_docs[0]]; view.last_modified_docs = [Some(view.doc), view.last_modified_docs[0]];
} }

Loading…
Cancel
Save