Mercurial > vim
comparison src/testdir/test_match.vim @ 14407:631344964949 v8.1.0218
patch 8.1.0218: cannot add matches to another window
commit https://github.com/vim/vim/commit/95e51470f10e1ddcc4b2ce53e4f7ff7aa2e58417
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 28 16:55:56 2018 +0200
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 #3260)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 28 Jul 2018 17:00:05 +0200 |
parents | 61450cb2b6a1 |
children | 2dcaa860e3fc |
comparison
equal
deleted
inserted
replaced
14406:9b4fa7ed95a0 | 14407:631344964949 |
---|---|
190 call clearmatches() | 190 call clearmatches() |
191 syntax off | 191 syntax off |
192 set hlsearch& | 192 set hlsearch& |
193 endfunc | 193 endfunc |
194 | 194 |
195 func Test_matchaddpos_otherwin() | |
196 syntax on | |
197 new | |
198 call setline(1, ['12345', 'NP']) | |
199 let winid = win_getid() | |
200 | |
201 wincmd w | |
202 call matchadd('Search', '4', 10, -1, {'window': winid}) | |
203 call matchaddpos('Error', [[1,2], [2,2]], 10, -1, {'window': winid}) | |
204 redraw! | |
205 call assert_notequal(screenattr(1,2), 0) | |
206 call assert_notequal(screenattr(1,4), 0) | |
207 call assert_notequal(screenattr(2,2), 0) | |
208 call assert_equal(screenattr(1,2), screenattr(2,2)) | |
209 call assert_notequal(screenattr(1,2), screenattr(1,4)) | |
210 | |
211 wincmd w | |
212 bwipe! | |
213 call clearmatches() | |
214 syntax off | |
215 endfunc | |
216 | |
195 func Test_matchaddpos_using_negative_priority() | 217 func Test_matchaddpos_using_negative_priority() |
196 set hlsearch | 218 set hlsearch |
197 | 219 |
198 call clearmatches() | 220 call clearmatches() |
199 | 221 |