comparison src/testdir/test_textprop.vim @ 19642:647ef636a11e v8.2.0378

patch 8.2.0378: prop_find() does not find all props Commit: https://github.com/vim/vim/commit/346f18e5fe12e6aaba5a6a18f6d0deb55eb7a9e8 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 13 21:36:40 2020 +0100 patch 8.2.0378: prop_find() does not find all props Problem: prop_find() does not find all props. Solution: Check being in the start line. (Axel Forsman, closes https://github.com/vim/vim/issues/5776)
author Bram Moolenaar <Bram@vim.org>
date Fri, 13 Mar 2020 21:45:03 +0100
parents 1d493fce1fbd
children 2fb397573541
comparison
equal deleted inserted replaced
19641:73b2c928a8aa 19642:647ef636a11e
209 let result = prop_find({'type': 'prop_name', 'lnum': 1}, 'f') 209 let result = prop_find({'type': 'prop_name', 'lnum': 1}, 'f')
210 call assert_equal(expected[0], result) 210 call assert_equal(expected[0], result)
211 211
212 call prop_clear(1,6) 212 call prop_clear(1,6)
213 call prop_type_delete('prop_name') 213 call prop_type_delete('prop_name')
214 endfunc
215
216 func Test_prop_find_smaller_len_than_match_col()
217 new
218 call prop_type_add('test', {'highlight': 'ErrorMsg'})
219 call setline(1, ['xxxx', 'x'])
220 call prop_add(1, 4, {'type': 'test'})
221 call assert_equal({'id': 0, 'lnum': 1, 'col': 4, 'type': 'test', 'length': 0, 'start': 1, 'end': 1},
222 \ prop_find({'type': 'test', 'lnum': 2, 'col': 1}, 'b'))
223 bwipe!
224 call prop_type_delete('test')
214 endfunc 225 endfunc
215 226
216 func Test_prop_add() 227 func Test_prop_add()
217 new 228 new
218 call AddPropTypes() 229 call AddPropTypes()