From c8e0f3268e86d5b4568c2bec38bffeb654a1883a Mon Sep 17 00:00:00 2001 From: Petr Mironychev <9195189+Palm1r@users.noreply.github.com> Date: Wed, 26 Feb 2025 23:12:26 +0100 Subject: [PATCH] fix: End completion position in lsp answer --- LLMClientInterface.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/LLMClientInterface.cpp b/LLMClientInterface.cpp index c609637..95fb842 100644 --- a/LLMClientInterface.cpp +++ b/LLMClientInterface.cpp @@ -300,9 +300,7 @@ void LLMClientInterface::sendCompletionToClient(const QString &completion, completionItem[LanguageServerProtocol::textKey] = processedCompletion; QJsonObject range; range["start"] = position; - QJsonObject end = position; - end["character"] = position["character"].toInt() + processedCompletion.length(); - range["end"] = end; + range["end"] = position; completionItem[LanguageServerProtocol::rangeKey] = range; completionItem[LanguageServerProtocol::positionKey] = position; completions.append(completionItem);