File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7474
7575### Fixed
7676
77+ - Fixed bug where diagnostic messages would linger from the previous state
78+ ([ #706 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/706 ) )
7779- Fixed activation bug on Windows causing the persistent cache to fail
7880 ([ #700 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/700 ) )
7981- Fixed bug where the linter's internal cache directory would not always exist
Original file line number Diff line number Diff line change @@ -329,8 +329,12 @@ export class FortranLintingProvider {
329329 if ( ! isFortran ( document ) ) return ;
330330
331331 const output = await this . doBuild ( document ) ;
332- if ( ! output ) return ;
333-
332+ if ( ! output ) {
333+ // If the linter output is now empty, then there are no errors.
334+ // Discard the previous diagnostic state for this document
335+ if ( this . fortranDiagnostics . has ( document . uri ) ) this . fortranDiagnostics . delete ( document . uri ) ;
336+ return ;
337+ }
334338 let diagnostics : vscode . Diagnostic [ ] = this . linter . parse ( output ) ;
335339 // Remove duplicates from the diagnostics array
336340 diagnostics = [ ...new Map ( diagnostics . map ( v => [ JSON . stringify ( v ) , v ] ) ) . values ( ) ] ;
You can’t perform that action at this time.
0 commit comments