aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2019-04-03 19:57:48 +0200
committerMarco Hinz <mh.codebro@gmail.com>2019-04-04 20:24:39 +0200
commit6b75d9f865b9a1ef56dbf9e4485aaf133efa2f22 (patch)
treee535cda127dbdcfe36ea2003d4f8247fdabd4719 /src/nvim/testdir
parentfb555c6898e8deddf6191144b18b382fa8decf99 (diff)
downloadrneovim-6b75d9f865b9a1ef56dbf9e4485aaf133efa2f22.tar.gz
rneovim-6b75d9f865b9a1ef56dbf9e4485aaf133efa2f22.tar.bz2
rneovim-6b75d9f865b9a1ef56dbf9e4485aaf133efa2f22.zip
vim-patch:8.1.0218: cannot add matches to another window
Problem: Cannot add matches to another window. (Qiming Zhao) Solution: Add the "window" argument to matchadd() and matchaddpos(). (closes vim/vim#3260) https://github.com/vim/vim/commit/95e51470f10e1ddcc4b2ce53e4f7ff7aa2e58417
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_match.vim22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_match.vim b/src/nvim/testdir/test_match.vim
index e608a2e58b..e926b946a9 100644
--- a/src/nvim/testdir/test_match.vim
+++ b/src/nvim/testdir/test_match.vim
@@ -202,6 +202,28 @@ func Test_matchaddpos()
set hlsearch&
endfunc
+func Test_matchaddpos_otherwin()
+ syntax on
+ new
+ call setline(1, ['12345', 'NP'])
+ let winid = win_getid()
+
+ wincmd w
+ call matchadd('Search', '4', 10, -1, {'window': winid})
+ call matchaddpos('Error', [[1,2], [2,2]], 10, -1, {'window': winid})
+ redraw!
+ call assert_notequal(screenattr(1,2), 0)
+ call assert_notequal(screenattr(1,4), 0)
+ call assert_notequal(screenattr(2,2), 0)
+ call assert_equal(screenattr(1,2), screenattr(2,2))
+ call assert_notequal(screenattr(1,2), screenattr(1,4))
+
+ wincmd w
+ bwipe!
+ call clearmatches()
+ syntax off
+endfunc
+
func Test_matchaddpos_using_negative_priority()
set hlsearch