diff options
author | unknown <sumnekosun@intranet.123u.com> | 2019-04-02 17:09:56 +0800 |
---|---|---|
committer | unknown <sumnekosun@intranet.123u.com> | 2019-04-02 17:09:56 +0800 |
commit | d283727cffff43312e5129801e265c2957d507d6 (patch) | |
tree | 93333303de1715e6c2754213d6721bdcfcf73a22 /server/src/core/completion.lua | |
parent | 43e0d5819011e069893ee9f05eba2fc90d1b4bf5 (diff) | |
download | lua-language-server-d283727cffff43312e5129801e265c2957d507d6.zip |
函数重新从全局查找
Diffstat (limited to 'server/src/core/completion.lua')
-rw-r--r-- | server/src/core/completion.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua index 027f7faa..112e6408 100644 --- a/server/src/core/completion.lua +++ b/server/src/core/completion.lua @@ -400,12 +400,17 @@ local function searchCallArg(vm, source, word, callback, pos) return a.start > b.start end) local call = results[1] - local func, args = call:bindCall() - if not func then + local args = call:bindCall() + if not args then return end - local lib = func:getLib() + local value = call:findCallFunction() + if not value then + return + end + + local lib = value:getLib() if not lib then return end |