diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-24 14:25:26 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-24 14:25:26 +0200 |
commit | 06029a857a3d4d90b3162090506c1e00dc84c60b (patch) | |
tree | d868ce4168d16c3521aa6bd16b6a81e358ebeb35 /src/testdir/test_match.vim | |
parent | 9bc4dde45d45df732953491d0f2c3fd3b10a627e (diff) | |
download | vim-git-06029a857a3d4d90b3162090506c1e00dc84c60b.tar.gz |
patch 8.1.1739: deleted match highlighting not updated in other windowv8.1.1739
Problem: Deleted match highlighting not updated in other window.
Solution: Mark the window for refresh. (closes #4720) Also fix that
ambi-width check clears with wrong attributes.
Diffstat (limited to 'src/testdir/test_match.vim')
-rw-r--r-- | src/testdir/test_match.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/testdir/test_match.vim b/src/testdir/test_match.vim index 51c901689..07005b52f 100644 --- a/src/testdir/test_match.vim +++ b/src/testdir/test_match.vim @@ -1,6 +1,8 @@ " Test for :match, :2match, :3match, clearmatches(), getmatches(), matchadd(), " matchaddpos(), matcharg(), matchdelete(), and setmatches(). +source screendump.vim + function Test_match() highlight MyGroup1 term=bold ctermbg=red guibg=red highlight MyGroup2 term=italic ctermbg=green guibg=green @@ -251,4 +253,26 @@ func Test_matchaddpos_using_negative_priority() set hlsearch& endfunc +func Test_matchdelete_other_window() + if !CanRunVimInTerminal() + throw 'Skipped: cannot make screendumps' + endif + + let lines =<< trim END + call setline(1, 'Hello Vim world') + let mid = matchadd('Error', 'world', 1) + let winid = win_getid() + new + END + call writefile(lines, 'XscriptMatchDelete') + let buf = RunVimInTerminal('-S XscriptMatchDelete', #{rows: 12}) + call term_wait(buf) + call term_sendkeys(buf, ":call matchdelete(mid, winid)\<CR>") + call VerifyScreenDump(buf, 'Test_matchdelete_1', {}) + + call StopVimInTerminal(buf) + call delete('XscriptMatchDelete') +endfunc + + " vim: shiftwidth=2 sts=2 expandtab |