From d45931530be1a75d22ff675cd6e53535d9842d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 9 Feb 2022 13:39:42 +0800 Subject: fix completion `triggerCharacter` is `nil` when typing letters and numbers --- script/core/completion/completion.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'script/core/completion/completion.lua') diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua index 800c11a1..680b9a23 100644 --- a/script/core/completion/completion.lua +++ b/script/core/completion/completion.lua @@ -1254,11 +1254,9 @@ local function tryWord(state, position, triggerCharacter, results) checkFunctionArgByDocParam(state, word, startPos, results) else local afterLocal = isAfterLocal(state, startPos) - if triggerCharacter ~= nil then - local stop = checkKeyWord(state, startPos, position, word, hasSpace, afterLocal, results) - if stop then - return - end + local stop = checkKeyWord(state, startPos, position, word, hasSpace, afterLocal, results) + if stop then + return end if not hasSpace then if afterLocal then -- cgit v1.2.3