Skip to content

Commit

Permalink
Fix incorrect last modified behavior (#1621)
Browse files Browse the repository at this point in the history
Looks like it checked the wrong doc id when setting last modified doc.
  • Loading branch information
pickfire authored Feb 6, 2022
1 parent 6ea477a commit 6c11708
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-view/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]];
}
Expand Down

0 comments on commit 6c11708

Please sign in to comment.