patch 9.1.0798: too many strlen() calls in cmdhist.c
Problem: too many strlen() calls in cmdhist.c
Solution: refactor code and remove strlen() calls
(John Marriott)
closes: #15888
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/structs.h b/src/structs.h
index da403ff..e4a79f5 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1283,6 +1283,7 @@
int hisnum; // identifying number
int viminfo; // when TRUE hisstr comes from viminfo
char_u *hisstr; // actual entry, separator char after the NUL
+ size_t hisstrlen; // length of hisstr (excluding the NUL)
time_t time_set; // when it was typed, zero if unknown
} histentry_T;