Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 16778:eda4d65f232c v8.1.1391
patch 8.1.1391: no popup window support
commit https://github.com/vim/vim/commit/4d784b21d14fc66e98a2b07f70343cdd4acd62aa
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 25 19:51:39 2019 +0200
patch 8.1.1391: no popup window support
Problem: No popup window support.
Solution: Add initial code for popup windows. Add the 'wincolor' option.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 25 May 2019 20:00:08 +0200 |
parents | |
children | ddfa924df50d |
comparison
equal
deleted
inserted
replaced
16777:20d51e99dd6a | 16778:eda4d65f232c |
---|---|
1 " Tests for popup windows | |
2 | |
3 if !has('textprop') | |
4 finish | |
5 endif | |
6 | |
7 source screendump.vim | |
8 | |
9 func Test_simple_popup() | |
10 if !CanRunVimInTerminal() | |
11 return | |
12 endif | |
13 call writefile([ | |
14 \ "call setline(1, range(1, 100))", | |
15 \ "let winid = popup_create('hello there', {'line': 3, 'col': 11})", | |
16 \ "hi PopupColor ctermbg=lightblue", | |
17 \ "call setwinvar(winid, '&wincolor', 'PopupColor')", | |
18 \ "let winid2 = popup_create(['another one', 'another two', 'another three'], {'line': 3, 'col': 25})", | |
19 \], 'XtestPopup') | |
20 let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10}) | |
21 call VerifyScreenDump(buf, 'Test_popupwin_01', {}) | |
22 | |
23 " clean up | |
24 call StopVimInTerminal(buf) | |
25 call delete('XtestPopup') | |
26 endfunc |