Mercurial > vim
diff src/testdir/test_popupwin.vim @ 17022:79c3a52fdb07 v8.1.1511
patch 8.1.1511: matches in a popup window are not displayed properly
commit https://github.com/vim/vim/commit/ac2450a9a863f02a5e749f2b7058157cbf76edf8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 9 18:04:28 2019 +0200
patch 8.1.1511: matches in a popup window are not displayed properly
Problem: Matches in a popup window are not displayed properly.
Solution: Do display matches in a popup window. (closes https://github.com/vim/vim/issues/4517)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 09 Jun 2019 18:15:05 +0200 |
parents | 2ec0f953ec3f |
children | 905e1b154058 |
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -188,6 +188,32 @@ func Test_popup_with_syntax_setbufvar() call delete('XtestPopup') endfunc +func Test_popup_with_matches() + if !CanRunVimInTerminal() + throw 'Skipped: cannot make screendumps' + endif + let lines =<< trim END + call setline(1, ['111 222 333', '444 555 666']) + let winid = popup_create([ + \ '111 222 333', + \ '444 555 666', + \], {'line': 3, 'col': 10, 'border': []}) + set hlsearch + /666 + call matchadd('ErrorMsg', '111') + call matchadd('ErrorMsg', '444') + call win_execute(winid, "call matchadd('ErrorMsg', '111')") + call win_execute(winid, "call matchadd('ErrorMsg', '555')") + END + call writefile(lines, 'XtestPopupMatches') + let buf = RunVimInTerminal('-S XtestPopupMatches', {'rows': 10}) + call VerifyScreenDump(buf, 'Test_popupwin_matches', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('XtestPopupMatches') +endfunc + func Test_popup_all_corners() if !CanRunVimInTerminal() throw 'Skipped: cannot make screendumps'