diff src/textprop.c @ 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 d2153928b376
line wrap: on
line diff
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -663,13 +663,14 @@ f_prop_find(typval_T *argvars, typval_T 
 	    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)
 	    {