mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
vim-patch:8.2.4944: text properties are wrong after "cc" (#27821)
Problem: Text properties are wrong after "cc". (Axel Forsman)
Solution: Pass the deleted byte count to inserted_bytes(). (closes vim/vim#10412,
closes vim/vim#7737, closes vim/vim#5763)
d0b1a09f44
Co-authored-by: LemonBoy <thatlemon@gmail.com>
This commit is contained in:
@@ -1613,15 +1613,8 @@ int op_delete(oparg_T *oap)
|
||||
} else {
|
||||
beginline(0); // cursor in column 0
|
||||
}
|
||||
|
||||
int old_len = (int)strlen(ml_get(curwin->w_cursor.lnum));
|
||||
truncate_line(false); // delete the rest of the line
|
||||
|
||||
extmark_splice_cols(curbuf,
|
||||
(int)curwin->w_cursor.lnum - 1, curwin->w_cursor.col,
|
||||
old_len - curwin->w_cursor.col, 0, kExtmarkUndo);
|
||||
|
||||
// leave cursor past last char in line
|
||||
truncate_line(false); // delete the rest of the line,
|
||||
// leave cursor past last char in line
|
||||
if (oap->line_count > 1) {
|
||||
u_clearline(curbuf); // "U" command not possible after "2cc"
|
||||
}
|
||||
|
Reference in New Issue
Block a user