comparison src/ops.c @ 16680:c263acbbd961 v8.1.1342

patch 8.1.1342: using freed memory when joining line with text property commit https://github.com/vim/vim/commit/787880a86dbcb79cdf6e8241b1d99ac4a7acbc09 Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 17 20:17:40 2019 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Fri, 17 May 2019 20:30:06 +0200
parents 6f453673eb19
children 7847d281cbbf
comparison
equal deleted inserted replaced
16679:86d8068ffeda 16680:c263acbbd961
4633 4633
4634 if (setmark) 4634 if (setmark)
4635 { 4635 {
4636 /* Set the '] mark. */ 4636 /* Set the '] mark. */
4637 curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum; 4637 curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
4638 curwin->w_buffer->b_op_end.col = (colnr_T)STRLEN(newp); 4638 curwin->w_buffer->b_op_end.col = (colnr_T)sumsize;
4639 } 4639 }
4640 4640
4641 /* Only report the change in the first line here, del_lines() will report 4641 /* Only report the change in the first line here, del_lines() will report
4642 * the deleted line. */ 4642 * the deleted line. */
4643 changed_lines(curwin->w_cursor.lnum, currsize, 4643 changed_lines(curwin->w_cursor.lnum, currsize,