mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
vim-patch:9.1.0488: Wrong padding for pum "kind" with 'rightleft' (#29352)
Problem: Wrong padding for pum "kind" with 'rightleft'.
Solution: Fix off-by-one error (zeertzjq).
The screen_fill() above is end-exclusive, and
- With 'rightleft' it fills `pum_col - pum_base_width - n + 1` to `col`,
so the next `col` should be `pum_col - pum_base_width - n`.
- With 'norightleft' it fills `col` to `pum_col - pum_base_width + n - 1`,
so the next `col` should be `pum_col - pum_base_width + n`.
closes: vim/vim#15004
a2324373eb
This commit is contained in:
@@ -713,7 +713,7 @@ void pum_redraw(void)
|
|||||||
|
|
||||||
if (pum_rl) {
|
if (pum_rl) {
|
||||||
grid_line_fill(col_off - pum_base_width - n + 1, grid_col + 1, schar_from_ascii(' '), attr);
|
grid_line_fill(col_off - pum_base_width - n + 1, grid_col + 1, schar_from_ascii(' '), attr);
|
||||||
grid_col = col_off - pum_base_width - n + 1;
|
grid_col = col_off - pum_base_width - n;
|
||||||
} else {
|
} else {
|
||||||
grid_line_fill(grid_col, col_off + pum_base_width + n, schar_from_ascii(' '), attr);
|
grid_line_fill(grid_col, col_off + pum_base_width + n, schar_from_ascii(' '), attr);
|
||||||
grid_col = col_off + pum_base_width + n;
|
grid_col = col_off + pum_base_width + n;
|
||||||
|
@@ -4681,7 +4681,7 @@ describe('builtin popupmenu', function()
|
|||||||
{1: }{s: dnikoof o}{ms:of}|
|
{1: }{s: dnikoof o}{ms:of}|
|
||||||
{1: }{n: dnikoof rabo}{mn:of}|
|
{1: }{n: dnikoof rabo}{mn:of}|
|
||||||
{1: }{n: dnikoof zaBo}{mn:of}|
|
{1: }{n: dnikoof zaBo}{mn:of}|
|
||||||
{1: }{n: dnikoofalabo}{mn:of}|
|
{1: }{n: dnikoof alabo}{mn:of}|
|
||||||
{1: ~}|*14
|
{1: ~}|*14
|
||||||
{2:-- }{5:match 1 of 8} |
|
{2:-- }{5:match 1 of 8} |
|
||||||
]])
|
]])
|
||||||
|
Reference in New Issue
Block a user