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/textprop.c | |
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/textprop.c')
-rw-r--r-- | src/textprop.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/textprop.c b/src/textprop.c index 4f5329ebb..6e3ed5f7b 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -663,13 +663,14 @@ f_prop_find(typval_T *argvars, typval_T *rettv) mch_memmove(&prop, text + textlen + i * sizeof(textprop_T), sizeof(textprop_T)); - if (dir < 0) - { - if (col < prop.tp_col) - break; - } - else if (prop.tp_col + prop.tp_len - (prop.tp_len != 0) < col) - continue; + if (lnum == lnum_start) + if (dir < 0) + { + if (col < prop.tp_col) + break; + } + else if (prop.tp_col + prop.tp_len - (prop.tp_len != 0) < col) + continue; if (prop.tp_id == id || prop.tp_type == type_id) { |