From d2cca606a1b67a7e9e093154449f35eaacab0532 Mon Sep 17 00:00:00 2001 From: Maria José Solano Date: Sat, 22 Feb 2025 13:19:00 -0800 Subject: fix(float): ensure floating window width can fit title --- test/functional/plugin/lsp_spec.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua index a0064f741e..17e3fbbf70 100644 --- a/test/functional/plugin/lsp_spec.lua +++ b/test/functional/plugin/lsp_spec.lua @@ -3528,6 +3528,20 @@ describe('LSP', function() end) ) end) + + it('considers title when computing width', function() + eq( + { 17, 2 }, + exec_lua(function() + return { + vim.lsp.util._make_floating_popup_size( + { 'foo', 'bar' }, + { title = 'A very long title' } + ), + } + end) + ) + end) end) describe('lsp.util.trim.trim_empty_lines', function() -- cgit