Skip to content

Commit

Permalink
Fix preload completion session.
Browse files Browse the repository at this point in the history
  • Loading branch information
scturtle authored and MaskRay committed Jul 25, 2018
1 parent 8b4a8d2 commit ff102c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/clang_complete.cc
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,7 @@ void TryEnsureDocumentParsed(ClangCompleteManager *manager,
WorkingFiles::Snapshot snapshot = session->working_files->AsSnapshot(
{StripFileType(session->file.filename)});

LOG_S(INFO) << "Creating completion session with arguments "
<< StringJoin(args, " ");
LOG_S(INFO) << "create completion session for " << session->file.filename;
*tu = ClangTranslationUnit::Create(session->file.filename, args, snapshot,
diagnostic);
}
Expand Down
7 changes: 4 additions & 3 deletions src/messages/textDocument_didOpen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ struct Handler_TextDocumentDidOpen
}

include_complete->AddFile(working_file->filename);
clang_complete->NotifyView(path);
if (g_config->diagnostics.onParse)
clang_complete->DiagnosticsUpdate({params.textDocument.uri});
if (params.args.size())
project->SetFlagsForFile(params.args, path);

Expand All @@ -64,6 +61,10 @@ struct Handler_TextDocumentDidOpen

clang_complete->FlushSession(entry.filename);
}

clang_complete->NotifyView(path);
if (g_config->diagnostics.onParse)
clang_complete->DiagnosticsUpdate({params.textDocument.uri});
}
};
REGISTER_MESSAGE_HANDLER(Handler_TextDocumentDidOpen);
Expand Down

0 comments on commit ff102c9

Please sign in to comment.