1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 21:35:06 +00:00

HackStudio: Do not change the cursor in the LSP autocomplete request

The C++ completion somehow depends on this, so move that behaviour into
the C++ language server instead.
This commit is contained in:
AnotherTest 2020-10-04 11:16:13 +03:30 committed by Andreas Kling
parent 9e73b0b696
commit 34039d6639
2 changed files with 2 additions and 2 deletions

View file

@ -159,7 +159,7 @@ void ClientConnection::handle(const Messages::LanguageServer::AutoCompleteSugges
return;
}
auto suggestions = AutoComplete::get_suggestions(document->text(), { (size_t)message.cursor_line(), (size_t)message.cursor_column() });
auto suggestions = AutoComplete::get_suggestions(document->text(), { (size_t)message.cursor_line(), (size_t)max(message.cursor_column(), message.cursor_column() - 1) });
post_message(Messages::LanguageClient::AutoCompleteSuggestions(move(suggestions)));
}