File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ impl VHDLServer {
2626
2727 let mut by_uri = diagnostics_by_uri ( diagnostics) ;
2828 for ( file_uri, cached_diagnostics) in self . diagnostic_cache . iter_mut ( ) {
29- let Some ( new_diagnostics) = by_uri. remove ( file_uri) else {
29+ let Some ( mut new_diagnostics) = by_uri. remove ( file_uri) else {
3030 // Diagnostics are in the cache, but not in the newly created diagnostics.
3131 // This means that there are no longer any diagnostics in the given file.
3232 // As a consequence, the client needs to be updated
@@ -54,6 +54,8 @@ impl VHDLServer {
5454 } ;
5555 self . rpc
5656 . send_notification ( "textDocument/publishDiagnostics" , publish_diagnostics) ;
57+ cached_diagnostics. clear ( ) ;
58+ cached_diagnostics. append ( & mut new_diagnostics) ;
5759 }
5860 // else: diagnostics are the same in the cache and the new analysis state.
5961 // No need to update.
You can’t perform that action at this time.
0 commit comments