Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
28258:26ce95b122e1 | 28259:0f1a0bef2c02 |
---|---|
2508 call assert_equal('"sign define0', @:) | 2508 call assert_equal('"sign define0', @:) |
2509 set nowildmenu wildoptions& | 2509 set nowildmenu wildoptions& |
2510 cunmap <F2> | 2510 cunmap <F2> |
2511 endfunc | 2511 endfunc |
2512 | 2512 |
2513 " Test for opening the cmdline completion popup menu from the terminal window. | |
2514 " The popup menu should be positioned correctly over the status line of the | |
2515 " bottom-most window. | |
2516 func Test_wildmenu_pum_from_terminal() | |
2517 CheckRunVimInTerminal | |
2518 let python = PythonProg() | |
2519 call CheckPython(python) | |
2520 | |
2521 %bw! | |
2522 let cmds = ['set wildmenu wildoptions=pum'] | |
2523 let pcmd = python .. ' -c "import sys; sys.stdout.write(sys.stdin.read())"' | |
2524 call add(cmds, "call term_start('" .. pcmd .. "')") | |
2525 call writefile(cmds, 'Xtest') | |
2526 let buf = RunVimInTerminal('-S Xtest', #{rows: 10}) | |
2527 call term_sendkeys(buf, "\r\r\r") | |
2528 call term_wait(buf) | |
2529 call term_sendkeys(buf, "\<C-W>:sign \<Tab>") | |
2530 call term_wait(buf) | |
2531 call VerifyScreenDump(buf, 'Test_wildmenu_pum_term_01', {}) | |
2532 call term_wait(buf) | |
2533 call StopVimInTerminal(buf) | |
2534 call delete('Xtest') | |
2535 endfunc | |
2536 | |
2513 " Test for completion after a :substitute command followed by a pipe (|) | 2537 " Test for completion after a :substitute command followed by a pipe (|) |
2514 " character | 2538 " character |
2515 func Test_cmdline_complete_substitute() | 2539 func Test_cmdline_complete_substitute() |
2516 call feedkeys(":s | \t\<C-B>\"\<CR>", 'xt') | 2540 call feedkeys(":s | \t\<C-B>\"\<CR>", 'xt') |
2517 call assert_equal("\"s | \t", @:) | 2541 call assert_equal("\"s | \t", @:) |