summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-12-11 19:12:23 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-12-11 19:12:23 +0800
commiteb2e18588116f1c72c80cfa7c379bd98bc157640 (patch)
tree70cdb0d8d5127baa6089e62f3fb48bb34b8291e5
parentb745c50723f8e9becc0224b868992d116ffc1e3b (diff)
downloadlua-language-server-eb2e18588116f1c72c80cfa7c379bd98bc157640.zip
修正一个bug
-rw-r--r--script-beta/core/completion.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/script-beta/core/completion.lua b/script-beta/core/completion.lua
index 73111268..20c15630 100644
--- a/script-beta/core/completion.lua
+++ b/script-beta/core/completion.lua
@@ -552,7 +552,13 @@ local function checkKeyWord(ast, text, start, word, hasSpace, results)
local snipType = config.config.completion.keywordSnippet
for _, data in ipairs(keyWordMap) do
local key = data[1]
- if matchKey(word, key) then
+ local eq
+ if hasSpace then
+ eq = word == key
+ else
+ eq = matchKey(word, key)
+ end
+ if eq then
if snipType == 'Both' or snipType == 'Disable' then
if not hasSpace then
results[#results+1] = {