diff options
author | Shougo <Shougo.Matsu@gmail.com> | 2020-05-16 22:25:51 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-16 15:25:51 +0200 |
commit | d7d69fed18c2cd59d28ff12ef72f6fb2a98a7b66 (patch) | |
tree | c854446549f57498c8e07481a721c37c6a2e2d32 /src/nvim/testdir | |
parent | f3d0a1741ef69222ab7893ce4f801d26b6b3fb00 (diff) | |
download | rneovim-d7d69fed18c2cd59d28ff12ef72f6fb2a98a7b66.tar.gz rneovim-d7d69fed18c2cd59d28ff12ef72f6fb2a98a7b66.tar.bz2 rneovim-d7d69fed18c2cd59d28ff12ef72f6fb2a98a7b66.zip |
vim-patch:8.1.1084: cannot delete a match from another window (#12325)
Problem: Cannot delete a match from another window. (Paul Jolly)
Solution: Add window ID argument to matchdelete(), clearmatches(),
getmatches() and setmatches(). (Andy Massimino, closes vim/vim#4178)
https://github.com/vim/vim/commit/aff749145e23c0f20b5158d1d3a942948ed138e3
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_match.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_match.vim b/src/nvim/testdir/test_match.vim index c134cfb1c0..7a1894bc16 100644 --- a/src/nvim/testdir/test_match.vim +++ b/src/nvim/testdir/test_match.vim @@ -217,6 +217,19 @@ func Test_matchaddpos_otherwin() call assert_equal(screenattr(1,2), screenattr(2,2)) call assert_notequal(screenattr(1,2), screenattr(1,4)) + let savematches = getmatches(winid) + let expect = [ + \ {'group': 'Search', 'pattern': '4', 'priority': 10, 'id': 4}, + \ {'group': 'Error', 'id': 5, 'priority': 10, 'pos1': [1, 2, 1], 'pos2': [2, 2, 1]}, + \] + call assert_equal(expect, savematches) + + call clearmatches(winid) + call assert_equal([], getmatches(winid)) + + call setmatches(savematches, winid) + call assert_equal(expect, savematches) + wincmd w bwipe! call clearmatches() |