Skip to content

Commit

Permalink
Fixed diagnostics not being cleaned up properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Nimaoth committed Jul 29, 2024
1 parent 4a26ae2 commit 48689c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/text/text_document.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,10 @@ proc getLanguageServer*(self: TextDocument): Future[Option[LanguageServer]] {.as
self.onDiagnosticsHandle = ls.onDiagnostics.subscribe proc(diagnostics: lsp_types.PublicDiagnosticsParams) =
let uri = diagnostics.uri.decodeUrl.parseUri
if uri.path.normalizePathUnix == self.filename:

for line in self.diagnosticsPerLine.keys:
self.styledTextCache.del(line)

self.currentDiagnostics.setLen diagnostics.diagnostics.len
self.diagnosticsPerLine.clear()

Expand Down

0 comments on commit 48689c1

Please sign in to comment.