1
0
forked from aniani/vim

patch 9.1.0151: ml_get_buf_len() does not consider text properties

Problem:  ml_get_buf_len() does not consider text properties
          (zeertzj)
Solution: Store text length excluding text properties length
          in addition in the memline

related #14123
closes: #14133

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2024-03-05 20:43:25 +01:00
parent 4bb505e28c
commit a72d1be5a9
5 changed files with 16 additions and 2 deletions

View File

@@ -5070,6 +5070,7 @@ ins_tab(void)
vim_free(curbuf->b_ml.ml_line_ptr);
curbuf->b_ml.ml_line_ptr = newp;
curbuf->b_ml.ml_line_len -= i;
curbuf->b_ml.ml_line_textlen = (int)STRLEN(newp) + 1;
curbuf->b_ml.ml_flags =
(curbuf->b_ml.ml_flags | ML_LINE_DIRTY) & ~ML_EMPTY;
}