diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-04-28 06:23:19 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-28 06:23:19 +0800 |
| commit | 50107c37782fdeae7ad498c29d37a48cac87d657 (patch) | |
| tree | 4ebb0cab3b8af3899ef4cdd0325598e6dab1b020 /test/old/testdir | |
| parent | f65043154e023263bc98057b1792893ef2bfee18 (diff) | |
| parent | aca226d728418e791b897a908631d52aa24157fe (diff) | |
| download | rneovim-50107c37782fdeae7ad498c29d37a48cac87d657.tar.gz rneovim-50107c37782fdeae7ad498c29d37a48cac87d657.tar.bz2 rneovim-50107c37782fdeae7ad498c29d37a48cac87d657.zip | |
Merge pull request #23352 from zeertzjq/pum-at-cursor
fix(pum): make :popup position correctly with float border
Diffstat (limited to 'test/old/testdir')
| -rw-r--r-- | test/old/testdir/test_popup.vim | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim index 2cc676fb6d..54b40e5732 100644 --- a/test/old/testdir/test_popup.vim +++ b/test/old/testdir/test_popup.vim @@ -885,14 +885,14 @@ func Test_popup_command_dump() echomsg 'changed' endfunc END - call writefile(script, 'XtimerScript') + call writefile(script, 'XtimerScript', 'D') let lines =<< trim END one two three four five and one two Xthree four five one more two three four five END - call writefile(lines, 'Xtest') + call writefile(lines, 'Xtest', 'D') let buf = RunVimInTerminal('-S XtimerScript Xtest', {}) call term_sendkeys(buf, ":source $VIMRUNTIME/menu.vim\<CR>") call term_sendkeys(buf, "/X\<CR>:popup PopUp\<CR>") @@ -910,7 +910,7 @@ func Test_popup_command_dump() " Set a timer to change a menu entry while it's displayed. The text should " not change but the command does. Making the screendump also verifies that - " "changed" shows up, which means the timer triggered + " "changed" shows up, which means the timer triggered. call term_sendkeys(buf, "/X\<CR>:call StartTimer() | popup PopUp\<CR>") call VerifyScreenDump(buf, 'Test_popup_command_04', {}) @@ -918,9 +918,16 @@ func Test_popup_command_dump() call term_sendkeys(buf, "jj\<CR>") call VerifyScreenDump(buf, 'Test_popup_command_05', {}) + call term_sendkeys(buf, "\<Esc>") + + " Add a window toolbar to the window and check the :popup menu position. + call term_sendkeys(buf, ":nnoremenu WinBar.TEST :\<CR>") + call term_sendkeys(buf, "/X\<CR>:popup PopUp\<CR>") + call VerifyScreenDump(buf, 'Test_popup_command_06', {}) + + call term_sendkeys(buf, "\<Esc>") + call StopVimInTerminal(buf) - call delete('Xtest') - call delete('XtimerScript') endfunc func Test_popup_complete_backwards() |