diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-03-13 21:36:40 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-03-13 21:36:40 +0100 |
commit | 346f18e5fe12e6aaba5a6a18f6d0deb55eb7a9e8 (patch) | |
tree | 95ecb1be20705e9abbcd4d75f97169c4cbca8e46 /src/testdir/test_textprop.vim | |
parent | d47e6f0b4cc82e3ccdc4605bb1811861a5b2d115 (diff) | |
download | vim-git-346f18e5fe12e6aaba5a6a18f6d0deb55eb7a9e8.tar.gz |
patch 8.2.0378: prop_find() does not find all propsv8.2.0378
Problem: prop_find() does not find all props.
Solution: Check being in the start line. (Axel Forsman, closes #5776)
Diffstat (limited to 'src/testdir/test_textprop.vim')
-rw-r--r-- | src/testdir/test_textprop.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim index 6d3aaa3be..692b0c4bd 100644 --- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -213,6 +213,17 @@ func Test_prop_find() call prop_type_delete('prop_name') endfunc +func Test_prop_find_smaller_len_than_match_col() + new + call prop_type_add('test', {'highlight': 'ErrorMsg'}) + call setline(1, ['xxxx', 'x']) + call prop_add(1, 4, {'type': 'test'}) + call assert_equal({'id': 0, 'lnum': 1, 'col': 4, 'type': 'test', 'length': 0, 'start': 1, 'end': 1}, + \ prop_find({'type': 'test', 'lnum': 2, 'col': 1}, 'b')) + bwipe! + call prop_type_delete('test') +endfunc + func Test_prop_add() new call AddPropTypes() |