From 81ac8e9015142fb539ad888651130f6a0ab0b27a Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sun, 3 Feb 2019 20:31:06 +0100 Subject: popupmenu: fix alignment of kind and extra after #9530 --- test/functional/ui/popupmenu_spec.lua | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'test') diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index 9e6a61f4d0..6a10f60ad8 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -1178,5 +1178,56 @@ describe('builtin popupmenu', function() ]]) 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('') + screen:expect([[ + xx ^ | + {1:~ }{n: wordey x extrainfo }{1: }| + {1:~ }{n: thing }{1: }| + {1:~ }{n: sneaky bar }{1: }| + {1:~ }| + {1:~ }| + {1:~ }| + {2:-- INSERT --} | + ]]) + + feed('') + 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('') + screen:expect([[ + xx secre^t | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]) + end) end) -- cgit