summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-18 20:53:34 +0200
committerBram Moolenaar <Bram@vim.org>2019-10-18 20:53:34 +0200
commit92ea26b925a0835badb0af2d5887238a4198cabb (patch)
tree0ed45513ea242aa5c252f84cc00cf59b155b38e3 /src/ex_getln.c
parent7751d1d1a3d447d0d48f57f34e0da9f7c6ac433d (diff)
patch 8.1.2173: searchit() has too many argumentsv8.1.2173
Problem: Searchit() has too many arguments. Solution: Move optional arguments to a struct. Add the "wrapped" argument.
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 5816f3f9e7..45a0a36321 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -373,6 +373,7 @@ may_do_incsearch_highlighting(
pos_T end_pos;
#ifdef FEAT_RELTIME
proftime_T tm;
+ searchit_arg_T sia;
#endif
int next_char;
int use_last_pat;
@@ -445,12 +446,16 @@ may_do_incsearch_highlighting(
if (search_first_line != 0)
search_flags += SEARCH_START;
ccline.cmdbuff[skiplen + patlen] = NUL;
+#ifdef FEAT_RELTIME
+ vim_memset(&sia, 0, sizeof(sia));
+ sia.sa_tm = &tm;
+#endif
found = do_search(NULL, firstc == ':' ? '/' : firstc,
ccline.cmdbuff + skiplen, count, search_flags,
#ifdef FEAT_RELTIME
- &tm, NULL
+ &sia
#else
- NULL, NULL
+ NULL
#endif
);
ccline.cmdbuff[skiplen + patlen] = next_char;
@@ -597,8 +602,7 @@ may_adjust_incsearch_highlighting(
pat[patlen] = NUL;
i = searchit(curwin, curbuf, &t, NULL,
c == Ctrl_G ? FORWARD : BACKWARD,
- pat, count, search_flags,
- RE_SEARCH, 0, NULL, NULL);
+ pat, count, search_flags, RE_SEARCH, NULL);
--emsg_off;
pat[patlen] = save;
if (i)