Merge pull request #14463 from mfussenegger/decoded-result-false

lsp: Allow decoded.result to be `false`
This commit is contained in:
Michael Lingelbach 2021-04-30 11:37:47 -07:00 committed by GitHub
commit 0150cc4160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -518,7 +518,7 @@ local function start(cmd, cmd_args, dispatchers, extra_spawn_params)
send_response(decoded.id, err, result)
end)
-- This works because we are expecting vim.NIL here
elseif decoded.id and (decoded.result or decoded.error) then
elseif decoded.id and (decoded.result ~= vim.NIL or decoded.error ~= vim.NIL) then
-- Server Result
decoded.error = convert_NIL(decoded.error)
decoded.result = convert_NIL(decoded.result)