diff options
author | Au. <acehinnnqru@gmail.com> | 2025-03-22 10:43:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-22 10:43:06 +0800 |
commit | 5187be81c2eb2de6793a0f9d57d0f2d95f356d22 (patch) | |
tree | f3eaa80d53564c379a25be940139f1570986c7de /test | |
parent | b165ad067101df29636203ff104a2586f5df1413 (diff) | |
download | rneovim-5187be81c2eb2de6793a0f9d57d0f2d95f356d22.tar.gz rneovim-5187be81c2eb2de6793a0f9d57d0f2d95f356d22.tar.bz2 rneovim-5187be81c2eb2de6793a0f9d57d0f2d95f356d22.zip |
fix(lsp): handle using array as open_floating_preview title (#33016)
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/plugin/lsp_spec.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua index 4863873699..614c49a41f 100644 --- a/test/functional/plugin/lsp_spec.lua +++ b/test/functional/plugin/lsp_spec.lua @@ -3529,7 +3529,7 @@ describe('LSP', function() ) end) - it('considers title when computing width', function() + it('considers string title when computing width', function() eq( { 17, 2 }, exec_lua(function() @@ -3542,6 +3542,20 @@ describe('LSP', function() end) ) end) + + it('considers [string,string][] title when computing width', function() + eq( + { 17, 2 }, + exec_lua(function() + return { + vim.lsp.util._make_floating_popup_size( + { 'foo', 'bar' }, + { title = { { 'A very ', 'Normal' }, { 'long title', 'Normal' } } } + ), + } + end) + ) + end) end) describe('lsp.util.trim.trim_empty_lines', function() |