Mercurial > vim
diff src/testdir/test_cmdline.vim @ 28259:0f1a0bef2c02 v8.2.4655
patch 8.2.4655: cmdline completion popup menu positioned wrong
Commit: https://github.com/vim/vim/commit/1104a6d0c2004d39e9b6cb8f804d12b628a69869
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Thu Mar 31 12:34:15 2022 +0100
patch 8.2.4655: cmdline completion popup menu positioned wrong
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 #10050, closes #10035)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 31 Mar 2022 13:45:04 +0200 |
parents | 553ff405b719 |
children | d32dc906dd2c |
line wrap: on
line diff
--- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -2510,6 +2510,30 @@ func Test_wildmenumode_with_pum() cunmap <F2> endfunc +" Test for opening the cmdline completion popup menu from the terminal window. +" The popup menu should be positioned correctly over the status line of the +" bottom-most window. +func Test_wildmenu_pum_from_terminal() + CheckRunVimInTerminal + let python = PythonProg() + call CheckPython(python) + + %bw! + let cmds = ['set wildmenu wildoptions=pum'] + let pcmd = python .. ' -c "import sys; sys.stdout.write(sys.stdin.read())"' + call add(cmds, "call term_start('" .. pcmd .. "')") + call writefile(cmds, 'Xtest') + let buf = RunVimInTerminal('-S Xtest', #{rows: 10}) + call term_sendkeys(buf, "\r\r\r") + call term_wait(buf) + call term_sendkeys(buf, "\<C-W>:sign \<Tab>") + call term_wait(buf) + call VerifyScreenDump(buf, 'Test_wildmenu_pum_term_01', {}) + call term_wait(buf) + call StopVimInTerminal(buf) + call delete('Xtest') +endfunc + " Test for completion after a :substitute command followed by a pipe (|) " character func Test_cmdline_complete_substitute()