mirror of
https://github.com/vim/vim.git
synced 2025-10-01 04:54:07 -04:00
patch 9.1.0426: too many strlen() calls in search.c
Problem: too many strlen() calls in search.c Solution: refactor code and remove more strlen() calls, use explicit variable to remember strlen (John Marriott) closes: #14796 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
69dff00dfb
commit
8c85a2a49a
@@ -4567,7 +4567,7 @@ get_address(
|
||||
curwin->w_cursor.col = 0;
|
||||
searchcmdlen = 0;
|
||||
flags = silent ? 0 : SEARCH_HIS | SEARCH_MSG;
|
||||
if (!do_search(NULL, c, c, cmd, 1L, flags, NULL))
|
||||
if (!do_search(NULL, c, c, cmd, STRLEN(cmd), 1L, flags, NULL))
|
||||
{
|
||||
curwin->w_cursor = pos;
|
||||
cmd = NULL;
|
||||
@@ -4621,7 +4621,7 @@ get_address(
|
||||
pos.coladd = 0;
|
||||
if (searchit(curwin, curbuf, &pos, NULL,
|
||||
*cmd == '?' ? BACKWARD : FORWARD,
|
||||
(char_u *)"", 1L, SEARCH_MSG, i, NULL) != FAIL)
|
||||
(char_u *)"", 0, 1L, SEARCH_MSG, i, NULL) != FAIL)
|
||||
lnum = pos.lnum;
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user