diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-03-10 08:55:42 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-03-10 08:55:42 +0100 |
commit | 82e079df814f7372e9579450730062b205449efa (patch) | |
tree | 8a27b092082fdc7c4d35a93ebd63091221e18dae /src/structs.h | |
parent | 14759ded57447345ba11c11a99fd84344797862c (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/structs.h')
-rw-r--r-- | src/structs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/structs.h b/src/structs.h index b3b3f6a144..47a0050ddb 100644 --- a/src/structs.h +++ b/src/structs.h @@ -802,8 +802,8 @@ typedef struct memline #define ML_ALLOCATED 0x10 // ml_line_ptr is an allocated copy int ml_flags; - colnr_T ml_line_len; // length of the cached line + textproperties, including NUL - colnr_T ml_line_textlen;// length of the cached line, including NUL + colnr_T ml_line_len; // length of the cached line + NUL + text properties + colnr_T ml_line_textlen;// length of the cached line + NUL, 0 if not known yet linenr_T ml_line_lnum; // line number of cached line, 0 if not valid char_u *ml_line_ptr; // pointer to cached line |