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:
committed by
Christian Brabandt
parent
14759ded57
commit
82e079df81
@ -5088,7 +5088,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_line_textlen = 0;
|
||||
curbuf->b_ml.ml_flags =
|
||||
(curbuf->b_ml.ml_flags | ML_LINE_DIRTY) & ~ML_EMPTY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user