diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-06-25 00:19:46 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-06-25 00:23:00 -0400 |
commit | ace7e4e11ba18b769aa028d73808b9405ec5e437 (patch) | |
tree | 00f72b89d9cb19284539476a8cb41be7ca16191a | |
parent | 56a96d8f8299c9b29bb3ed2e35efde3086c322dc (diff) | |
download | rneovim-ace7e4e11ba18b769aa028d73808b9405ec5e437.tar.gz rneovim-ace7e4e11ba18b769aa028d73808b9405ec5e437.tar.bz2 rneovim-ace7e4e11ba18b769aa028d73808b9405ec5e437.zip |
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.
https://github.com/vim/vim/commit/787880a86dbcb79cdf6e8241b1d99ac4a7acbc09
-rw-r--r-- | src/nvim/ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index b5408fab9a..b96e075f66 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -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 |