summaryrefslogtreecommitdiff
path: root/script/core/completion/completion.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-02-09 13:39:42 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-02-09 13:39:42 +0800
commitd45931530be1a75d22ff675cd6e53535d9842d70 (patch)
treee9eeb71c6ace74057388de4ac979f1c4127f8f52 /script/core/completion/completion.lua
parent7321df77c443853370cbb10acd619a0073c55a13 (diff)
downloadlua-language-server-d45931530be1a75d22ff675cd6e53535d9842d70.zip
fix completion
`triggerCharacter` is `nil` when typing letters and numbers
Diffstat (limited to 'script/core/completion/completion.lua')
-rw-r--r--script/core/completion/completion.lua8
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