From 6e3890f4ce002ba308c09166b00e8ee86b6efa03 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 19 Jan 2023 15:13:27 +0800 Subject: vim-patch:8.2.4655: cmdline completion popup menu positioned wrong (#21894) Problem: Command line completion popup menu positioned wrong when using a terminal window. Solution: Position the popup menu differently when editing the command line. (Yegappan Lakshmanan, closes vim/vim#10050, closes vim/vim#10035) https://github.com/vim/vim/commit/1104a6d0c2004d39e9b6cb8f804d12b628a69869 The test in the patch looks a bit hard to understand. Add a Lua test that is more straightforward. Co-authored-by: Yegappan Lakshmanan --- test/functional/ui/popupmenu_spec.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/functional') diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index 0d874ae79d..1f139aa7fb 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -2781,6 +2781,26 @@ describe('builtin popupmenu', function() ]]} end) + it('wildoptions=pum with a wrapped line in buffer vim-patch:8.2.4655', function() + screen:try_resize(32, 10) + meths.buf_set_lines(0, 0, -1, true, { ('a'):rep(100) }) + command('set wildoptions+=pum') + feed('$') + feed(':sign ') + screen:expect([[ + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + aaaa {s: define } | + {1:~ }{n: jump }{1: }| + {1:~ }{n: list }{1: }| + {1:~ }{n: place }{1: }| + {1:~ }{n: undefine }{1: }| + {1:~ }{n: unplace }{1: }| + :sign define^ | + ]]) + end) + -- oldtest: Test_wildmenu_pum_clear_entries() it('wildoptions=pum when using Ctrl-E as wildchar vim-patch:9.0.1030', function() screen:try_resize(30, 10) -- cgit