summaryrefslogtreecommitdiff
path: root/server/src/core/completion.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/core/completion.lua')
-rw-r--r--server/src/core/completion.lua11
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