diff src/textprop.c @ 16060:176872829dc2 v8.1.1035

patch 8.1.1035: prop_remove() second argument is not optional commit https://github.com/vim/vim/commit/0a2f578e22de7e4d82075578afdd5fc2d2dd8134 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 22 13:20:43 2019 +0100 patch 8.1.1035: prop_remove() second argument is not optional Problem: prop_remove() second argument is not optional. Solution: Fix argument count. Use "buf" instead of "curbuf". (closes https://github.com/vim/vim/issues/4147)
author Bram Moolenaar <Bram@vim.org>
date Fri, 22 Mar 2019 13:30:05 +0100
parents 8013b532a1f7
children 08557bad0b9d
line wrap: on
line diff
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -629,7 +629,10 @@ f_prop_remove(typval_T *argvars, typval_
 			mch_memmove(newptr, buf->b_ml.ml_line_ptr,
 							buf->b_ml.ml_line_len);
 			buf->b_ml.ml_line_ptr = newptr;
-			curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
+			buf->b_ml.ml_flags |= ML_LINE_DIRTY;
+
+			cur_prop = buf->b_ml.ml_line_ptr + len
+							+ idx * sizeof(textprop_T);
 		    }
 
 		    taillen = buf->b_ml.ml_line_len - len