aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
diff options
context:
space:
mode:
authorMathias Fußenegger <mfussenegger@users.noreply.github.com>2020-02-27 00:00:06 +0100
committerGitHub <noreply@github.com>2020-02-27 00:00:06 +0100
commitcb8b9428ca796c68025afbba65a81381b2f6a304 (patch)
tree9dc80cf3ba018942c2086776757f594dcba901ed /runtime/lua/vim/lsp/util.lua
parentad745f9da289a56035b8c759cc8fac1b40a44558 (diff)
downloadrneovim-cb8b9428ca796c68025afbba65a81381b2f6a304.tar.gz
rneovim-cb8b9428ca796c68025afbba65a81381b2f6a304.tar.bz2
rneovim-cb8b9428ca796c68025afbba65a81381b2f6a304.zip
LSP/hover: Do not throw away contents if first line is empty (#11939)
haskell-ide-engine sends `hover` payloads as follows: { contents = { kind = "markdown", value = "\n```haskell\nfoo :: Either String (Integer, Text)\n```\n`foo` *local*" }, range = { end = { character = 5, line = 57 }, start = { character = 2, line = 57 } } } `value` starts with `\n`. The logic in `convert_input_to_markdown_lines` threw away the whole information.
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r--runtime/lua/vim/lsp/util.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 59300647b5..3eadefe051 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -269,7 +269,7 @@ function M.convert_input_to_markdown_lines(input, contents)
end
end
end
- if contents[1] == '' or contents[1] == nil then
+ if (contents[1] == '' or contents[1] == nil) and #contents == 1 then
return {}
end
return contents