summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-05-14 12:35:52 +0300
committerAndreas Kling <kling@serenityos.org>2021-05-15 23:28:50 +0200
commit9408013177cdff03610a12b33ce90d5055f54988 (patch)
tree9b3206795aeff5d48b5002c841048699aa7b6514
parent84e41c456542409fa4d51d856f03d908806c5e41 (diff)
downloadserenity-9408013177cdff03610a12b33ce90d5055f54988.zip
CppLanguageServer: Only re-create DocumentData in file_opened if needed
-rw-r--r--Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp
index 7f956a1131..1b02938386 100644
--- a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp
+++ b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp
@@ -328,7 +328,7 @@ void ParserAutoComplete::on_edit(const String& file)
void ParserAutoComplete::file_opened([[maybe_unused]] const String& file)
{
- set_document_data(file, create_document_data_for(file));
+ get_or_create_document_data(file);
}
Optional<GUI::AutocompleteProvider::ProjectLocation> ParserAutoComplete::find_declaration_of(const String& filename, const GUI::TextPosition& identifier_position)