Mercurial > vim
diff src/testdir/test_popupwin.vim @ 17815:9ec2526c04c5 v8.1.1904
patch 8.1.1904: cannot have an info popup align with the popup menu
Commit: https://github.com/vim/vim/commit/258cef59d8c53a5b1c04937c826dc133ad5710e2
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 21 17:29:29 2019 +0200
patch 8.1.1904: cannot have an info popup align with the popup menu
Problem: Cannot have an info popup align with the popup menu.
Solution: Add the "align" item to 'completepopup'.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 21 Aug 2019 17:30:03 +0200 |
parents | b5499bf22a97 |
children | e8a7029efa40 |
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -2292,4 +2292,33 @@ func Test_popupmenu_info_noborder() call delete('XtestInfoPopupNb') endfunc +func Test_popupmenu_info_align_menu() + CheckScreendump + + let lines = Get_popupmenu_lines() + call add(lines, 'set completepopup=height:4,border:off,align:menu') + call writefile(lines, 'XtestInfoPopupNb') + + let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14}) + call term_wait(buf, 50) + + call term_sendkeys(buf, "A\<C-X>\<C-U>") + call term_sendkeys(buf, "\<C-N>") + call term_sendkeys(buf, "\<C-N>") + call term_sendkeys(buf, "\<C-N>") + call VerifyScreenDump(buf, 'Test_popupwin_infopopup_align_1', {}) + + call term_sendkeys(buf, "test text test text test\<C-X>\<C-U>") + call term_sendkeys(buf, "\<C-N>") + call VerifyScreenDump(buf, 'Test_popupwin_infopopup_align_2', {}) + + call term_sendkeys(buf, "\<Esc>") + call term_sendkeys(buf, ":call setline(2, ['x']->repeat(10))\<CR>") + call term_sendkeys(buf, "Gotest text test text\<C-X>\<C-U>") + call VerifyScreenDump(buf, 'Test_popupwin_infopopup_align_3', {}) + + call StopVimInTerminal(buf) + call delete('XtestInfoPopupNb') +endfunc + " vim: shiftwidth=2 sts=2