From 30e74e31140b8ff1d7067d360380b25d6b7de850 Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Sun, 6 Feb 2022 12:39:08 +0800 Subject: [PATCH] Fix incorrect last modified behavior Looks like it checked the wrong doc id when setting last modified doc. --- helix-view/src/editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index aa2df6f74b86..27e6f1371a9a 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -442,7 +442,7 @@ impl Editor { view.last_accessed_doc = Some(view.doc); // Set last modified doc if modified and last modified doc is different 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]]; }