summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-26 17:54:24 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-26 17:54:24 +0800
commit71122e07d25c8f97219ef91226eb94de65a19825 (patch)
tree1919ca41037b80f90054ec2a39650ed4a94c3806 /server/src
parentd1b9237c44bdd9b1fccca5aa1a2b83608027e91d (diff)
downloadlua-language-server-71122e07d25c8f97219ef91226eb94de65a19825.zip
整理代码
Diffstat (limited to 'server/src')
-rw-r--r--server/src/matcher/completion.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/server/src/matcher/completion.lua b/server/src/matcher/completion.lua
index 8f74b7c7..29a86d10 100644
--- a/server/src/matcher/completion.lua
+++ b/server/src/matcher/completion.lua
@@ -386,22 +386,20 @@ end
return function (vm, pos)
local result, source = findResult(vm, pos)
- local inCall, inString
if not result then
+ isClose = true
result, source = findClosePos(vm, pos)
if not result then
return nil
end
end
- inString = getString(vm, pos)
- if inString then
- local calls = findCall(vm, pos)
- if not calls then
- return nil
- end
+ local inCall
+ local calls = findCall(vm, pos)
+ if calls then
inCall = calls[#calls]
end
+ local inString = getString(vm, pos)
local list = {}
local mark = {}
@@ -435,7 +433,9 @@ return function (vm, pos)
if inCall then
searchInArg(vm, inCall, inString, callback)
- else
+ end
+
+ if result and not inString then
if result.type == 'local' then
if source.isArg then
searchAsArg(vm, pos, result, callback)