summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-12-09 16:01:07 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-12-09 16:22:45 +0800
commit3eb1852a40f1eaf19331e091fe835d92a396d15f (patch)
tree50ff9d218805d6888260dbc80932dcc2543c333b
parent6a9530c46fe7dfbc1b03270ba67fe0a86833b719 (diff)
downloadlua-language-server-3eb1852a40f1eaf19331e091fe835d92a396d15f.zip
`activeParameter` should be uinteter
#1751
-rw-r--r--changelog.md2
-rw-r--r--script/provider/provider.lua2
2 files changed, 3 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index 50685423..5d35d36e 100644
--- a/changelog.md
+++ b/changelog.md
@@ -3,9 +3,11 @@
## 3.6.5
* `FIX` [#831]
* `FIX` [#1729]
+* `FIX` [#1751]
[#831]: https://github.com/sumneko/lua-language-server/issues/831
[#1729]: https://github.com/sumneko/lua-language-server/issues/1729
+[#1751]: https://github.com/sumneko/lua-language-server/issues/1751
`2022-11-29`
## 3.6.4
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',