diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2022-03-31 12:34:15 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-03-31 12:34:15 +0100 |
commit | 1104a6d0c2004d39e9b6cb8f804d12b628a69869 (patch) | |
tree | 2e7bc119f38f7c1fcb96452ac00c639a2b398013 /src/testdir | |
parent | 49d008d96b80d17e9770b066031aaaf9495761e2 (diff) |
patch 8.2.4655: cmdline completion popup menu positioned wrongv8.2.4655
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)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/dumps/Test_wildmenu_pum_term_01.dump | 10 | ||||
-rw-r--r-- | src/testdir/test_cmdline.vim | 24 | ||||
-rw-r--r-- | src/testdir/test_terminal.vim | 2 |
3 files changed, 35 insertions, 1 deletions
diff --git a/src/testdir/dumps/Test_wildmenu_pum_term_01.dump b/src/testdir/dumps/Test_wildmenu_pum_term_01.dump new file mode 100644 index 0000000000..b619875457 --- /dev/null +++ b/src/testdir/dumps/Test_wildmenu_pum_term_01.dump @@ -0,0 +1,10 @@ +| +0&#ffffff0@74 +@75 +@75 +@5| +0#0000001#e0e0e08|d|e|f|i|n|e| @8| +0#0000000#ffffff0@53 +|<+2#ffffff16#00e0003|o|r|t| | +0#0000001#ffd7ff255|j|u|m|p| @10|w+2#ffffff16#00e0003|r|i|t|e|(|s|y|s|.|s|t|d|i|n|.|r|e|a|d|(|)@1|"| |[|r|u|n@1|i|n|g|]| @1|0|,|0|-|1| @9|A|l@1 +| +0#0000000#ffffff0@4| +0#0000001#ffd7ff255|l|i|s|t| @10| +0#0000000#ffffff0@53 +|~+0#4040ff13&| @3| +0#0000001#ffd7ff255|p|l|a|c|e| @9| +0#4040ff13#ffffff0@53 +|~| @3| +0#0000001#ffd7ff255|u|n|d|e|f|i|n|e| @6| +0#4040ff13#ffffff0@53 +|[+1#0000000&|N|o| |N| +0#0000001#ffd7ff255|u|n|p|l|a|c|e| @7| +1#0000000#ffffff0@35|0|,|0|-|1| @9|A|l@1 +|:+0&&|s|i|g|n| |d|e|f|i|n|e> @62 diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index f2b03decb5..e38a56963d 100644 --- 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() diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 8e7525847a..f290eff3ad 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -935,7 +935,7 @@ func TerminalTmap(remap) tunmap 123 tunmap 456 call assert_equal('', maparg('123', 't')) - close + exe buf . 'bwipe' unlet g:job endfunc |