From cb8b9428ca796c68025afbba65a81381b2f6a304 Mon Sep 17 00:00:00 2001 From: Mathias Fußenegger Date: Thu, 27 Feb 2020 00:00:06 +0100 Subject: 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. --- runtime/lua/vim/lsp/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua/vim') 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 -- cgit