Mercurial > vim
diff src/testdir/test_popupwin.vim @ 17811:b5499bf22a97 v8.1.1902
patch 8.1.1902: cannot have an info popup without a border
Commit: https://github.com/vim/vim/commit/bd483b3f577ee1af7c8c8bf440f5d81613336975
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 21 15:13:41 2019 +0200
patch 8.1.1902: cannot have an info popup without a border
Problem: Cannot have an info popup without a border.
Solution: Add the "border" item to 'completepopup'.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 21 Aug 2019 15:15:03 +0200 |
parents | 4bd21046902b |
children | 9ec2526c04c5 |
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -2193,14 +2193,11 @@ func Test_previewpopup() call delete('Xheader.h') endfunc -func Test_popupmenu_info() - CheckScreendump - +func Get_popupmenu_lines() let lines =<< trim END set completeopt+=preview,popup set completefunc=CompleteFuncDict hi InfoPopup ctermbg=yellow - set completepopup=height:4,highlight:InfoPopup func CompleteFuncDict(findstart, base) if a:findstart @@ -2249,7 +2246,16 @@ func Test_popupmenu_info() endfunc call setline(1, 'text text text text text text text ') END + return lines +endfunc + +func Test_popupmenu_info_border() + CheckScreendump + + let lines = Get_popupmenu_lines() + call add(lines, 'set completepopup=height:4,highlight:InfoPopup') call writefile(lines, 'XtestInfoPopup') + let buf = RunVimInTerminal('-S XtestInfoPopup', #{rows: 14}) call term_wait(buf, 50) @@ -2269,4 +2275,21 @@ func Test_popupmenu_info() call delete('XtestInfoPopup') endfunc +func Test_popupmenu_info_noborder() + CheckScreendump + + let lines = Get_popupmenu_lines() + call add(lines, 'set completepopup=height:4,border:off') + 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 VerifyScreenDump(buf, 'Test_popupwin_infopopup_nb_1', {}) + + call StopVimInTerminal(buf) + call delete('XtestInfoPopupNb') +endfunc + " vim: shiftwidth=2 sts=2