Skip to content

Commit

Permalink
fix buffers not getting refreshed on did_save
Browse files Browse the repository at this point in the history
This oversight would result in syncing errors being continuously accumulated even after saving the file.
This seems to have resolved the issue mentioned in #31 about errors reappearing
  • Loading branch information
SpontanCombust committed May 21, 2024
1 parent b8a67d9 commit 04d889c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/lsp/src/providers/document_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub async fn did_save(backend: &Backend, params: lsp::DidSaveTextDocumentParams)
// Do a fresh reparse without caring about the previous state.
// This is a fail-safe in case of bad edits or document having been changed outside of the editor.
script_state.script.refresh(&doc_buff).expect("Script refresh error!");

script_state.buffer = doc_buff;
script_state.modified_timestamp = FileTime::now();
}

Expand Down

0 comments on commit 04d889c

Please sign in to comment.