0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 9.1.0163: Calling STRLEN() to compute ml_line_textlen when not needed

Problem:  Calling STRLEN() to compute ml_line_textlen when not needed.
Solution: Use 0 when STRLEN() will be required and call STRLEN() later.
          (zeertzjq)

closes: #14155

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2024-03-10 08:55:42 +01:00
committed by Christian Brabandt
parent 14759ded57
commit 82e079df81
5 changed files with 16 additions and 7 deletions

View File

@@ -1364,7 +1364,7 @@ del_bytes(
mch_memmove(newp + newlen + 1, oldp + oldlen + 1,
(size_t)curbuf->b_ml.ml_line_len - oldlen - 1);
curbuf->b_ml.ml_line_len -= count;
curbuf->b_ml.ml_line_textlen = (int)STRLEN(newp) + 1;
curbuf->b_ml.ml_line_textlen = 0;
}
#endif