fix(extmarks): U changed_bytes after extmark_splice (#26501)

See also: https://github.com/neovim/neovim/pull/26364
This commit is contained in:
Jaehwang Jung 2023-12-12 12:08:25 +09:00 committed by GitHub
parent a9fbba81d5
commit 2d33a766a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3031,9 +3031,9 @@ void u_undoline(void)
char *oldp = u_save_line(curbuf->b_u_line_lnum);
ml_replace(curbuf->b_u_line_lnum, curbuf->b_u_line_ptr, true);
changed_bytes(curbuf->b_u_line_lnum, 0);
extmark_splice_cols(curbuf, (int)curbuf->b_u_line_lnum - 1, 0, (colnr_T)strlen(oldp),
(colnr_T)strlen(curbuf->b_u_line_ptr), kExtmarkUndo);
changed_bytes(curbuf->b_u_line_lnum, 0);
xfree(curbuf->b_u_line_ptr);
curbuf->b_u_line_ptr = oldp;