mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 18:36:30 +00:00
Merge pull request #9579 from bfredl/pum_fix
popupmenu: fix alignment of kind and extra after #9530
This commit is contained in:
@@ -517,7 +517,7 @@ void pum_redraw(void)
|
|||||||
} else {
|
} else {
|
||||||
grid_fill(&pum_grid, row, row + 1, col,
|
grid_fill(&pum_grid, row, row + 1, col,
|
||||||
col_off + pum_base_width + n, ' ', ' ', attr);
|
col_off + pum_base_width + n, ' ', ' ', attr);
|
||||||
col = pum_base_width + n;
|
col = col_off + pum_base_width + n;
|
||||||
}
|
}
|
||||||
totwidth = pum_base_width + n;
|
totwidth = pum_base_width + n;
|
||||||
}
|
}
|
||||||
|
@@ -1178,5 +1178,56 @@ describe('builtin popupmenu', function()
|
|||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('works with kind, menu and abbr attributes', function()
|
||||||
|
screen:try_resize(40,8)
|
||||||
|
feed('ixx ')
|
||||||
|
funcs.complete(4, {{word='wordey', kind= 'x', menu='extrainfo'}, 'thing', {word='secret', abbr='sneaky', menu='bar'}})
|
||||||
|
screen:expect([[
|
||||||
|
xx wordey^ |
|
||||||
|
{1:~ }{s: wordey x extrainfo }{1: }|
|
||||||
|
{1:~ }{n: thing }{1: }|
|
||||||
|
{1:~ }{n: sneaky bar }{1: }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{2:-- INSERT --} |
|
||||||
|
]])
|
||||||
|
|
||||||
|
feed('<c-p>')
|
||||||
|
screen:expect([[
|
||||||
|
xx ^ |
|
||||||
|
{1:~ }{n: wordey x extrainfo }{1: }|
|
||||||
|
{1:~ }{n: thing }{1: }|
|
||||||
|
{1:~ }{n: sneaky bar }{1: }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{2:-- INSERT --} |
|
||||||
|
]])
|
||||||
|
|
||||||
|
feed('<c-p>')
|
||||||
|
screen:expect([[
|
||||||
|
xx secret^ |
|
||||||
|
{1:~ }{n: wordey x extrainfo }{1: }|
|
||||||
|
{1:~ }{n: thing }{1: }|
|
||||||
|
{1:~ }{s: sneaky bar }{1: }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{2:-- INSERT --} |
|
||||||
|
]])
|
||||||
|
|
||||||
|
feed('<esc>')
|
||||||
|
screen:expect([[
|
||||||
|
xx secre^t |
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
|
|
||||||
|
]])
|
||||||
|
end)
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
Reference in New Issue
Block a user