diff options
author | Christian Brabandt <cb@256bit.org> | 2024-03-05 20:43:25 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-03-05 20:43:25 +0100 |
commit | a72d1be5a9984709fc66f460b443ad4a38506113 (patch) | |
tree | 91d4d2520a8591d46c665886d2006be7947b6455 /src/edit.c | |
parent | 4bb505e28cac0389561fff78d8bbe0319c2bcf2f (diff) |
patch 9.1.0151: ml_get_buf_len() does not consider text propertiesv9.1.0151
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>
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c index 5760b06e86..d7c80ffcdf 100644 --- a/src/edit.c +++ b/src/edit.c @@ -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; } |