vim-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.
787880a86d
This commit is contained in:
Jan Edmund Lazo
2019-06-25 00:19:46 -04:00
parent 56a96d8f82
commit ace7e4e11b

View File

@@ -3749,7 +3749,7 @@ int do_join(size_t count,
if (setmark) {
// 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 = sumsize;
}
/* Only report the change in the first line here, del_lines() will report