forked from aniani/vim
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>
This commit is contained in:
committed by
Christian Brabandt
parent
6eca04e9f1
commit
8df07d0ca3
@@ -5192,10 +5192,10 @@ ex_global(exarg_T *eap)
|
||||
delim = *cmd; // get the delimiter
|
||||
++cmd; // skip delimiter if there is one
|
||||
pat = cmd; // remember start of pattern
|
||||
patlen = STRLEN(pat);
|
||||
cmd = skip_regexp_ex(cmd, delim, magic_isset(), &eap->arg, NULL, NULL);
|
||||
if (cmd[0] == delim) // end delimiter found
|
||||
*cmd++ = NUL; // replace it with a NUL
|
||||
patlen = STRLEN(pat);
|
||||
}
|
||||
|
||||
if (search_regcomp(pat, patlen, &used_pat, RE_BOTH, which_pat, SEARCH_HIS,
|
||||
|
Reference in New Issue
Block a user