@@ -188,6 +188,32 @@ func Test_popup_with_syntax_setbufvar()
188188 call delete (' XtestPopup' )
189189endfunc
190190
191+ func Test_popup_with_matches ()
192+ if ! CanRunVimInTerminal ()
193+ throw ' Skipped: cannot make screendumps'
194+ endif
195+ let lines = << trim END
196+ call setline (1 , [' 111 222 333' , ' 444 555 666' ])
197+ let winid = popup_create ([
198+ \ ' 111 222 333' ,
199+ \ ' 444 555 666' ,
200+ \] , {' line' : 3 , ' col' : 10 , ' border' : []})
201+ set hlsearch
202+ /666
203+ call matchadd (' ErrorMsg' , ' 111' )
204+ call matchadd (' ErrorMsg' , ' 444' )
205+ call win_execute (winid, " call matchadd('ErrorMsg', '111')" )
206+ call win_execute (winid, " call matchadd('ErrorMsg', '555')" )
207+ END
208+ call writefile (lines , ' XtestPopupMatches' )
209+ let buf = RunVimInTerminal (' -S XtestPopupMatches' , {' rows' : 10 })
210+ call VerifyScreenDump (buf , ' Test_popupwin_matches' , {})
211+
212+ " clean up
213+ call StopVimInTerminal (buf )
214+ call delete (' XtestPopupMatches' )
215+ endfunc
216+
191217func Test_popup_all_corners ()
192218 if ! CanRunVimInTerminal ()
193219 throw ' Skipped: cannot make screendumps'
0 commit comments