aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/lsp_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/plugin/lsp_spec.lua')
-rw-r--r--test/functional/plugin/lsp_spec.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index 9cefe96e79..5e9766c784 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -3501,6 +3501,19 @@ describe('LSP', function()
end)
)
end)
+ it('handles empty line', function()
+ exec_lua(function()
+ _G.contents = {
+ '',
+ }
+ end)
+ eq(
+ { 20, 1 },
+ exec_lua(function()
+ return { vim.lsp.util._make_floating_popup_size(_G.contents, { width = 20 }) }
+ end)
+ )
+ end)
end)
describe('lsp.util.trim.trim_empty_lines', function()