From 6c47a190022b221000ca4feddc48b845fdfad4ce Mon Sep 17 00:00:00 2001 From: Ivan Georgiev Date: Thu, 4 Dec 2025 14:13:41 +0200 Subject: [PATCH 1/2] fix diagnostic completions ending --- script/core/completion/completion.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua index f751e53d5..97cb093ae 100644 --- a/script/core/completion/completion.lua +++ b/script/core/completion/completion.lua @@ -1925,7 +1925,7 @@ local function tryluaDocBySource(state, position, source, results) kind = define.CompletionItemKind.Enum, textEdit = { start = source.start, - finish = source.start + #source.mode - 1, + finish = source.start + #source.mode, newText = mode, }, } @@ -1940,7 +1940,7 @@ local function tryluaDocBySource(state, position, source, results) kind = define.CompletionItemKind.Value, textEdit = { start = source.start, - finish = source.start + #source[1] - 1, + finish = source.start + #source[1], newText = name, }, } From 67c87df7b7d78cdd0675b99a1b8f45d1a7bb35e6 Mon Sep 17 00:00:00 2001 From: Ivan Georgiev Date: Thu, 4 Dec 2025 14:32:38 +0200 Subject: [PATCH 2/2] update changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index b6caa5050..910db1227 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ## Unreleased +* `FIX` Fix diagnostic completions incorrect textEdit.finish ## 3.16.0 `2025-12-2`