]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0488: Wrong padding for pum "kind" with 'rightleft' v9.1.0488
authorzeertzjq <zeertzjq@outlook.com>
Sat, 15 Jun 2024 13:08:27 +0000 (15:08 +0200)
committerChristian Brabandt <cb@256bit.org>
Sat, 15 Jun 2024 13:08:27 +0000 (15:08 +0200)
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: #15004

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/popupmenu.c
src/testdir/dumps/Test_pum_highlights_06.dump
src/version.c

index 7fb29d63580d1cac56d5685c2db6e5a4dd5ee3f2..25157e4ebcb8657daa1c870cd2f01e101f10f126 100644 (file)
@@ -728,7 +728,7 @@ pum_redraw(void)
            {
                screen_fill(row, row + 1, pum_col - pum_base_width - n + 1,
                                                    col + 1, ' ', ' ', attr);
-               col = pum_col - pum_base_width - n + 1;
+               col = pum_col - pum_base_width - n;
            }
            else
 #endif
index 6675a3135dd577e19ca977ad4ea45c24b46b3c1b..8aeb5ae311f0b33f7ab568f6de31cbfb2054fd24 100644 (file)
@@ -1,8 +1,8 @@
 | +0&#ffffff0@70|o>f|o|f
-| +0#4040ff13&@58| +0#0000001#e0e0e08@1|d|n|i|k|o@1|f| @3|o|o+0#00e0e07#ffd7ff255|f
-| +0#4040ff13#ffffff0@58| +0#0000001#ffd7ff255@1|d|n|i|k|o@1|f| |r|a|b|o|o+0#0000e05&|f
-| +0#4040ff13#ffffff0@58| +0#0000001#ffd7ff255@1|d|n|i|k|o@1|f| |z|a|B|o|o+0#0000e05&|f
-| +0#4040ff13#ffffff0@58| +0#0000001#ffd7ff255@1|d|n|i|k|o@1|f|a|l|a|b|o|o+0#0000e05&|f
+| +0#4040ff13&@58| +0#0000001#e0e0e08|d|n|i|k|o@1|f| @4|o|o+0#00e0e07#ffd7ff255|f
+| +0#4040ff13#ffffff0@58| +0#0000001#ffd7ff255|d|n|i|k|o@1|f| @1|r|a|b|o|o+0#0000e05&|f
+| +0#4040ff13#ffffff0@58| +0#0000001#ffd7ff255|d|n|i|k|o@1|f| @1|z|a|B|o|o+0#0000e05&|f
+| +0#4040ff13#ffffff0@58| +0#0000001#ffd7ff255|d|n|i|k|o@1|f| |a|l|a|b|o|o+0#0000e05&|f
 | +0#4040ff13#ffffff0@73|~
 | @73|~
 | @73|~
index 1a2f5d75c7aaab464f7db527968f81ddf7afa344..61532287da6b04da280397fc1e5712c5f7f803a3 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    488,
 /**/
     487,
 /**/