mirror of
https://github.com/MaskRay/ccls.git
synced 2025-02-22 08:29:38 +00:00
Add enable_shared_from_this to CompletionSession
This commit is contained in:
parent
808e0f5277
commit
b683c863e3
@ -13,7 +13,7 @@
|
|||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
struct CompletionSession {
|
struct CompletionSession : public std::enable_shared_from_this<CompletionSession> {
|
||||||
Project::Entry file;
|
Project::Entry file;
|
||||||
WorkingFiles* working_files;
|
WorkingFiles* working_files;
|
||||||
clang::Index index;
|
clang::Index index;
|
||||||
@ -81,8 +81,8 @@ struct ClangCompleteManager {
|
|||||||
std::shared_ptr<CompletionSession> TryGetSession(const std::string& filename, bool create_if_needed);
|
std::shared_ptr<CompletionSession> TryGetSession(const std::string& filename, bool create_if_needed);
|
||||||
|
|
||||||
// TODO: make these configurable.
|
// TODO: make these configurable.
|
||||||
const int kMaxViewSessions = 3;
|
const int kMaxViewSessions = 1;
|
||||||
const int kMaxEditSessions = 10;
|
const int kMaxEditSessions = 1;
|
||||||
|
|
||||||
// Global state.
|
// Global state.
|
||||||
Config* config_;
|
Config* config_;
|
||||||
|
Loading…
Reference in New Issue
Block a user