summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-09-18 17:51:43 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-09-18 17:51:43 +0800
commitbae4fa96a08158668d8b005f7885a774ad1c98fb (patch)
treea8931bdbc2150696ed3553538fe8b69b4ffa4ba8 /script/core
parentb45a90132438bb2d84b7376066e5ff409833a13f (diff)
downloadlua-language-server-bae4fa96a08158668d8b005f7885a774ad1c98fb.zip
update
Diffstat (limited to 'script/core')
-rw-r--r--script/core/completion.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua
index 51f1087e..46847540 100644
--- a/script/core/completion.lua
+++ b/script/core/completion.lua
@@ -842,8 +842,8 @@ local function checkProvideLocal(state, word, start, results)
end)
end
-local function checkFunctionArgByDocParam(state, word, start, results)
- local func = guide.eachSourceContain(state.ast, start, function (source)
+local function checkFunctionArgByDocParam(state, word, startPos, results)
+ local func = guide.eachSourceContain(state.ast, startPos, function (source)
if source.type == 'function' then
return source
end
@@ -863,7 +863,7 @@ local function checkFunctionArgByDocParam(state, word, start, results)
end
local firstArg = func.args and func.args[1]
if not firstArg
- or firstArg.start <= start and firstArg.finish >= start then
+ or firstArg.start <= startPos and firstArg.finish >= startPos then
local firstParam = params[1]
if firstParam and matchKey(word, firstParam.param[1]) then
local label = {}