vim-patch:9.1.0798: too many strlen() calls in cmdhist.c (#30895)

Problem:  too many strlen() calls in cmdhist.c
Solution: refactor code and remove strlen() calls
          (John Marriott)

closes: vim/vim#15888

8df07d0ca3

Co-authored-by: John Marriott <basilisk@internode.on.net>
This commit is contained in:
zeertzjq
2024-10-22 13:03:02 +08:00
committed by GitHub
parent 1b9dafa67b
commit ca7855c5ba
5 changed files with 25 additions and 30 deletions

View File

@@ -23,6 +23,7 @@ enum { HIST_COUNT = HIST_DEBUG + 1, }; ///< Number of history tables
typedef struct {
int hisnum; ///< Entry identifier number.
char *hisstr; ///< Actual entry, separator char after the NUL.
size_t hisstrlen; ///< Length of hisstr (excluding the NUL).
Timestamp timestamp; ///< Time when entry was added.
AdditionalData *additional_data; ///< Additional entries from ShaDa file.
} histentry_T;