summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_popup.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-27 19:36:55 +0100
committerBram Moolenaar <Bram@vim.org>2023-04-27 19:36:55 +0100
commit4e1ca0d9a6c6d66987da67155e97f83f286ffbcc (patch)
tree63a7c548e7e2ad2ffad040a1998243cf6adcd805 /src/testdir/test_popup.vim
parentb7f2270bab102d68f83a6300699b7f98efad81f2 (diff)
patch 9.0.1493: popup menu position wrong in window with toolbarv9.0.1493
Problem: Popup menu position wrong in window with toolbar. Solution: Take the window toolbar into account when positioning the popup menu. (closes #12308)
Diffstat (limited to 'src/testdir/test_popup.vim')
-rw-r--r--src/testdir/test_popup.vim11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index 1b091e3381..a0a1f745a7 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -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,6 +918,15 @@ 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)
endfunc