patch 8.1.1342: using freed memory when joining line with text property
Problem: Using freed memory when joining line with text property.
Solution: Use already computed length.
diff --git a/src/ops.c b/src/ops.c
index d77aa2e..489c473 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -4635,7 +4635,7 @@
{
/* Set the '] mark. */
curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
- curwin->w_buffer->b_op_end.col = (colnr_T)STRLEN(newp);
+ curwin->w_buffer->b_op_end.col = (colnr_T)sumsize;
}
/* Only report the change in the first line here, del_lines() will report