summaryrefslogtreecommitdiffstats
path: root/src/change.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-10 08:55:42 +0100
committerChristian Brabandt <cb@256bit.org>2024-03-10 08:55:42 +0100
commit82e079df814f7372e9579450730062b205449efa (patch)
tree8a27b092082fdc7c4d35a93ebd63091221e18dae /src/change.c
parent14759ded57447345ba11c11a99fd84344797862c (diff)
patch 9.1.0163: Calling STRLEN() to compute ml_line_textlen when not neededv9.1.0163
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>
Diffstat (limited to 'src/change.c')
-rw-r--r--src/change.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/change.c b/src/change.c
index 847c187836..3af19b600c 100644
--- a/src/change.c
+++ b/src/change.c
@@ -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