vim-patch:9.1.1255: missing test condition for 'pummaxwidth' setting

Problem:  missing test condition for 'pummaxwidth' setting, pummaxwidth
          not effective when width is 32 and height is 10
          (after v9.1.1250)
Solution: add missing comparison condition in pum_width()
          (glepnir)

closes: vim/vim#16999

532c5aec6f

Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
zeertzjq
2025-03-29 06:35:11 +08:00
parent 62da4e2949
commit 675ee057e0
4 changed files with 45 additions and 2 deletions

View File

@@ -5621,6 +5621,42 @@ describe('builtin popupmenu', function()
]])
end
feed('<Esc>3Gdd"zp')
screen:try_resize(32, 10)
feed('GA<C-X><C-N>')
if multigrid then
screen:expect({
grid = [[
## grid 1
[2:--------------------------------]|*9
[3:--------------------------------]|
## grid 2
123456789_123456789_123456789_a |
123456789_123456789_123456789_b |
123456789_123456789_|
123456789_a^ |
{1:~ }|*5
## grid 3
{2:-- }{5:match 1 of 2} |
## grid 4
{s: 12345...}|
{n: 12345...}|
]],
float_pos = { [4] = { -1, 'NW', 2, 4, 11, false, 100 } },
})
else
screen:expect([[
123456789_123456789_123456789_a |
123456789_123456789_123456789_b |
123456789_123456789_|
123456789_a^ |
{1:~ }{s: 12345...}{1: }|
{1:~ }{n: 12345...}{1: }|
{1:~ }|*3
{2:-- }{5:match 1 of 2} |
]])
end
feed('<Esc>3Gdd"zp')
end)
-- oldtest: Test_pum_maxwidth_multibyte()