diff --git a/src/clang_complete.h b/src/clang_complete.h index aef609f9..c185acf2 100644 --- a/src/clang_complete.h +++ b/src/clang_complete.h @@ -13,7 +13,7 @@ #include #include -struct CompletionSession { +struct CompletionSession : public std::enable_shared_from_this { Project::Entry file; WorkingFiles* working_files; clang::Index index; @@ -81,8 +81,8 @@ struct ClangCompleteManager { std::shared_ptr TryGetSession(const std::string& filename, bool create_if_needed); // TODO: make these configurable. - const int kMaxViewSessions = 3; - const int kMaxEditSessions = 10; + const int kMaxViewSessions = 1; + const int kMaxEditSessions = 1; // Global state. Config* config_;