mirror of
https://github.com/vim/vim.git
synced 2025-10-14 07:04:10 -04:00
patch 8.1.0690: setline() and setbufline() do not clear text properties
Problem: setline() and setbufline() do not clear text properties. Solution: Clear text properties when setting the text.
This commit is contained in:
@@ -1357,8 +1357,10 @@ set_buffer_lines(
|
||||
|
||||
if (!append && lnum <= curbuf->b_ml.ml_line_count)
|
||||
{
|
||||
/* existing line, replace it */
|
||||
if (u_savesub(lnum) == OK && ml_replace(lnum, line, TRUE) == OK)
|
||||
// Existing line, replace it.
|
||||
// Removes any existing text properties.
|
||||
if (u_savesub(lnum) == OK && ml_replace_len(
|
||||
lnum, line, (colnr_T)STRLEN(line) + 1, TRUE, TRUE) == OK)
|
||||
{
|
||||
changed_bytes(lnum, 0);
|
||||
if (is_curbuf && lnum == curwin->w_cursor.lnum)
|
||||
|
Reference in New Issue
Block a user