summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r--script/provider/provider.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index ede4039e..d7c5c655 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -797,7 +797,7 @@ m.register 'textDocument/signatureHelp' {
infos[i] = {
label = result.label,
parameters = parameters,
- activeParameter = result.index - 1,
+ activeParameter = math.max(0, result.index - 1),
documentation = result.description and {
value = tostring(result.description),
kind = 'markdown',