From fd2ef4edf9cc1461edaf9f7ce34711d9b40a7fb8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 15 Jun 2024 21:39:56 +0800 Subject: 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 https://github.com/vim/vim/commit/a2324373eb1c3f1777bc40cb6dcd5e895a15fe10 --- test/functional/ui/popupmenu_spec.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/functional') diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index 323be3bd4d..177b2d707a 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -4664,10 +4664,10 @@ describe('builtin popupmenu', function() feed('S') screen:expect([[ ^ | - {1: }{s: dnikoof oof}| - {1: }{n: dnikoof raboof}| - {1: }{n: dnikoof zaBoof}| - {1: }{n: dnikoof alaboof}| + {1: }{s: dnikoof oof}| + {1: }{n: dnikoof raboof}| + {1: }{n: dnikoof zaBoof}| + {1: }{n: dnikoof alaboof}| {1: }{n: 好你}| {1: }{n: 吗好你}| {1: }{n: 吗好不你}| @@ -4678,10 +4678,10 @@ describe('builtin popupmenu', function() feed('fo') screen:expect([[ ^ of| - {1: }{s: dnikoof o}{ms:of}| - {1: }{n: dnikoof rabo}{mn:of}| - {1: }{n: dnikoof zaBo}{mn:of}| - {1: }{n: dnikoofalabo}{mn:of}| + {1: }{s: dnikoof o}{ms:of}| + {1: }{n: dnikoof rabo}{mn:of}| + {1: }{n: dnikoof zaBo}{mn:of}| + {1: }{n: dnikoof alabo}{mn:of}| {1: ~}|*14 {2:-- }{5:match 1 of 8} | ]]) -- cgit