diff options
author | Ivan Tham | 2022-02-06 05:23:12 +0000 |
---|---|---|
committer | GitHub | 2022-02-06 05:23:12 +0000 |
commit | 6c11708fb30cd394f136d7ed2807bc92bd67dfad (patch) | |
tree | 1dcd2fd0c94cc5d67f851da50c658759cf2933b1 | |
parent | 6ea477ab60e242c2cd66af32ece601a691fcec4b (diff) |
Fix incorrect last modified behavior (#1621)
Looks like it checked the wrong doc id when setting last modified doc.
-rw-r--r-- | helix-view/src/editor.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index aa2df6f7..27e6f137 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]]; } |