diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-02-09 13:39:42 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-02-09 13:39:42 +0800 |
commit | d45931530be1a75d22ff675cd6e53535d9842d70 (patch) | |
tree | e9eeb71c6ace74057388de4ac979f1c4127f8f52 /script/core | |
parent | 7321df77c443853370cbb10acd619a0073c55a13 (diff) | |
download | lua-language-server-d45931530be1a75d22ff675cd6e53535d9842d70.zip |
fix completion
`triggerCharacter` is `nil` when typing letters and numbers
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/completion/completion.lua | 8 |
1 files changed, 3 insertions, 5 deletions
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 |