vim-patch:8.2.3540: the mark '] is wrong after put with a count

Problem:    The mark '] is wrong after put with a count. (Naohiro Ono)
Solution:   Use the right line number. (closes vim/vim#8956)
f47ebf1e1a
This commit is contained in:
zeertzjq
2022-01-29 06:05:39 +08:00
parent 5228850749
commit 436a470ef5
2 changed files with 13 additions and 1 deletions

View File

@@ -3591,7 +3591,7 @@ error:
// Put the '] mark on the first byte of the last inserted character.
// Correct the length for change in indent.
curbuf->b_op_end.lnum = lnum;
curbuf->b_op_end.lnum = new_lnum;
col = (colnr_T)STRLEN(y_array[y_size - 1]) - lendiff;
if (col > 1) {
curbuf->b_op_end.col = col - 1 - utf_head_off(y_array[y_size - 1],