From f5efa024487962cd68a48beaadd498a0a666ac01 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Mon, 29 May 2017 16:33:57 -0700 Subject: [PATCH] Clear diagnostics for open files. --- src/command_line.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/command_line.cc b/src/command_line.cc index 90f7e6f8..4554bee5 100644 --- a/src/command_line.cc +++ b/src/command_line.cc @@ -2154,7 +2154,15 @@ bool QueryDbMainLoop( case IpcId::TextDocumentDidClose: { auto msg = static_cast(message.get()); + + // Clear any diagnostics for the file. + Out_TextDocumentPublishDiagnostics diag; + diag.params.uri = msg->params.textDocument.uri; + IpcManager::instance()->SendOutMessageToClient(IpcId::TextDocumentPublishDiagnostics, diag); + + // Remove internal state. working_files->OnClose(msg->params); + break; }