summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-09-17 21:18:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-09-17 21:18:32 +0800
commit1167244d45c4010912261d03b54aacc7115c69ab (patch)
tree8293e622f23072bc97ca184e70f69de298d92aeb /script
parent84148fbedef3f3ae04552dcf3218e05027c17625 (diff)
downloadlua-language-server-1167244d45c4010912261d03b54aacc7115c69ab.zip
update
Diffstat (limited to 'script')
-rw-r--r--script/core/completion.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua
index 08d6f5f2..8d861aeb 100644
--- a/script/core/completion.lua
+++ b/script/core/completion.lua
@@ -1268,17 +1268,18 @@ local function trySymbol(state, text, position, results)
if isInString(state, position) then
return nil
end
+ local startPos = guide.offsetToPosition(state, start)
if symbol == '.'
or symbol == ':' then
- local parent, oop = findParent(state, text, start)
+ local parent, oop = findParent(state, text, startPos)
if parent then
tracy.ZoneBeginN 'completion.trySymbol'
- checkField(state, '', start, position, parent, oop, results)
+ checkField(state, '', startPos, position, parent, oop, results)
tracy.ZoneEnd()
end
end
if symbol == '(' then
- checkFunctionArgByDocParam(state, '', start, results)
+ checkFunctionArgByDocParam(state, '', startPos, results)
end
end