summaryrefslogtreecommitdiff
path: root/server/src/core/completion.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-21 17:01:12 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-21 17:01:12 +0800
commit71d24c50b9b44dbd1b14958e7941fb7c9a1ab11c (patch)
treee15c1d3662f799cfe7c47211f21f6f7142a9068c /server/src/core/completion.lua
parent3573568a50627ccf1b87ec5ebce585b4207b1826 (diff)
downloadlua-language-server-71d24c50b9b44dbd1b14958e7941fb7c9a1ab11c.zip
修正bug
Diffstat (limited to 'server/src/core/completion.lua')
-rw-r--r--server/src/core/completion.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua
index 3e855ca6..13a36d94 100644
--- a/server/src/core/completion.lua
+++ b/server/src/core/completion.lua
@@ -547,7 +547,7 @@ local function clearList(list, source)
end
end
-return function (vm, pos, buf)
+return function (vm, pos, word)
local list = {}
local callback = makeList(list)
local inCall = findCall(vm, pos)
@@ -567,8 +567,8 @@ return function (vm, pos, buf)
searchAllWords(result.key, vm, callback)
clearList(list, source)
else
- if buf then
- searchAllWords(buf:sub(pos-1, pos-1), vm, callback)
+ if word then
+ searchAllWords(word, vm, callback)
end
end
end