Flush sessions on textDocument/didOpen

This commit is contained in:
Elliot Berman 2018-03-20 18:49:40 -04:00 committed by Jacob Dufault
parent 958422e77f
commit 1afb6c3988

View File

@ -7,6 +7,8 @@
#include "timer.h"
#include "working_files.h"
#include <loguru.hpp>
namespace {
// Open, view, change, close file
struct Ipc_TextDocumentDidOpen
@ -65,6 +67,9 @@ struct TextDocumentDidOpenHandler
entry.filename, params.args.size() ? params.args : entry.args,
true /*is_interactive*/, params.textDocument.text, cache_manager),
true /* priority */);
clang_complete->FlushSession(entry.filename);
LOG_S(INFO) << "Flushed clang complete sessions for " << entry.filename;
}
};
REGISTER_MESSAGE_HANDLER(TextDocumentDidOpenHandler);