comparison src/testdir/test_match.vim @ 17482:6cf077f59152 v8.1.1739

patch 8.1.1739: deleted match highlighting not updated in other window commit https://github.com/vim/vim/commit/06029a857a3d4d90b3162090506c1e00dc84c60b Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 24 14:25:26 2019 +0200 patch 8.1.1739: deleted match highlighting not updated in other window Problem: Deleted match highlighting not updated in other window. Solution: Mark the window for refresh. (closes https://github.com/vim/vim/issues/4720) Also fix that ambi-width check clears with wrong attributes.
author Bram Moolenaar <Bram@vim.org>
date Wed, 24 Jul 2019 14:30:08 +0200
parents aef0f93d3eba
children bdf277d2d14c
comparison
equal deleted inserted replaced
17481:0cd89bb4dfa8 17482:6cf077f59152
1 " Test for :match, :2match, :3match, clearmatches(), getmatches(), matchadd(), 1 " Test for :match, :2match, :3match, clearmatches(), getmatches(), matchadd(),
2 " matchaddpos(), matcharg(), matchdelete(), and setmatches(). 2 " matchaddpos(), matcharg(), matchdelete(), and setmatches().
3
4 source screendump.vim
3 5
4 function Test_match() 6 function Test_match()
5 highlight MyGroup1 term=bold ctermbg=red guibg=red 7 highlight MyGroup1 term=bold ctermbg=red guibg=red
6 highlight MyGroup2 term=italic ctermbg=green guibg=green 8 highlight MyGroup2 term=italic ctermbg=green guibg=green
7 highlight MyGroup3 term=underline ctermbg=blue guibg=blue 9 highlight MyGroup3 term=underline ctermbg=blue guibg=blue
249 251
250 nohl 252 nohl
251 set hlsearch& 253 set hlsearch&
252 endfunc 254 endfunc
253 255
256 func Test_matchdelete_other_window()
257 if !CanRunVimInTerminal()
258 throw 'Skipped: cannot make screendumps'
259 endif
260
261 let lines =<< trim END
262 call setline(1, 'Hello Vim world')
263 let mid = matchadd('Error', 'world', 1)
264 let winid = win_getid()
265 new
266 END
267 call writefile(lines, 'XscriptMatchDelete')
268 let buf = RunVimInTerminal('-S XscriptMatchDelete', #{rows: 12})
269 call term_wait(buf)
270 call term_sendkeys(buf, ":call matchdelete(mid, winid)\<CR>")
271 call VerifyScreenDump(buf, 'Test_matchdelete_1', {})
272
273 call StopVimInTerminal(buf)
274 call delete('XscriptMatchDelete')
275 endfunc
276
277
254 " vim: shiftwidth=2 sts=2 expandtab 278 " vim: shiftwidth=2 sts=2 expandtab