summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/core/completion/completion.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua
index 30df047c..05b035af 100644
--- a/script/core/completion/completion.lua
+++ b/script/core/completion/completion.lua
@@ -158,11 +158,14 @@ local function buildFunctionSnip(source, value, oop)
local args = getArg(value, oop)
local id = 0
args = args:gsub('[^,]+', function (arg)
+ if arg:match('^%s+[^?]+%?:') or arg:match('^%s+%.%.%.:') then
+ return ''
+ end
id = id + 1
return arg:gsub('^(%s*)(.+)', function (sp, word)
return ('%s${%d:%s}'):format(sp, id, word)
end)
- end)
+ end):gsub(',+$', '')
return ('%s(%s)'):format(name, args)
end