From af68d1e84435b1fbbf30ef24658255206f1ff7b3 Mon Sep 17 00:00:00 2001 From: Crollie Rollz Date: Sun, 3 Apr 2022 01:45:58 +0800 Subject: fix(completion): OOP emitter should have `self` arg 3db634a3a2e48a97772065e7e9da4d29a07a8098 Align docFUnc with the call index, rather than assume it's always the 2nd arg (where "self" is concerned this is the 3rd arg) --- script/core/completion/completion.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'script/core/completion') diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua index 969de95a..eadf2739 100644 --- a/script/core/completion/completion.lua +++ b/script/core/completion/completion.lua @@ -1401,7 +1401,7 @@ local function getCallEnumsAndFuncs(source, index, oop, call) and doc.field[1] == source[1] then local eventName = noder.getFieldEventName(doc) if eventName and eventName == myEventName then - local docFunc = doc.extends.types[1].args[2].extends.types[1] + local docFunc = doc.extends.types[1].args[index].extends.types[1] results[#results+1] = { label = infer.viewDocFunction(docFunc), description = doc.comment, -- cgit v1.2.3