aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2020-10-27 19:39:24 -0700
committerGitHub <noreply@github.com>2020-10-27 22:39:24 -0400
commitfd7aa6768a6c341edc1fe768c13899a3d92d8b1d (patch)
tree91a521d2e9204934ba681dae3bd2f03109685973 /runtime/lua/vim/lsp/util.lua
parentb6897ebc0c623d0a74c221c3030c7eaf17b7e151 (diff)
downloadrneovim-fd7aa6768a6c341edc1fe768c13899a3d92d8b1d.tar.gz
rneovim-fd7aa6768a6c341edc1fe768c13899a3d92d8b1d.tar.bz2
rneovim-fd7aa6768a6c341edc1fe768c13899a3d92d8b1d.zip
lsp: Fix case where active_signature == vim.NIL (#13114)
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r--runtime/lua/vim/lsp/util.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index b5f171a985..775932c7fd 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -492,7 +492,10 @@ function M.convert_signature_help_to_markdown_lines(signature_help)
--=== 0`. Whenever possible implementors should make an active decision about
--the active signature and shouldn't rely on a default value.
local contents = {}
- local active_signature = signature_help.activeSignature or 0
+ local active_signature = signature_help.activeSignature
+ if active_signature == vim.NIL or active_signature == nil then
+ active_signature = 0
+ end
-- If the activeSignature is not inside the valid range, then clip it.
if active_signature >= #signature_help.signatures then
active_signature = 0