vim-patch:8.1.2173: searchit() has too many arguments

Problem:    Searchit() has too many arguments.
Solution:   Move optional arguments to a struct.  Add the "wrapped" argument.
92ea26b925
This commit is contained in:
Jaehwang Jerry Jung
2019-10-25 19:54:53 +09:00
parent 19ba36d0e1
commit 034077ed1c
11 changed files with 74 additions and 39 deletions

View File

@@ -1075,7 +1075,7 @@ static void command_line_next_incsearch(CommandLineState *s, bool next_match)
int found = searchit(curwin, curbuf, &t, NULL,
next_match ? FORWARD : BACKWARD,
pat, s->count, search_flags,
RE_SEARCH, 0, NULL, NULL);
RE_SEARCH, NULL);
emsg_off--;
ui_busy_stop();
if (found) {
@@ -1818,6 +1818,7 @@ static int command_line_changed(CommandLineState *s)
if (p_is && !cmd_silent && (s->firstc == '/' || s->firstc == '?')) {
pos_T end_pos;
proftime_T tm;
searchit_arg_T sia;
// if there is a character waiting, search and redraw later
if (char_avail()) {
@@ -1844,8 +1845,10 @@ static int command_line_changed(CommandLineState *s)
if (!p_hls) {
search_flags += SEARCH_KEEP;
}
memset(&sia, 0, sizeof(sia));
sia.sa_tm = &tm;
i = do_search(NULL, s->firstc, ccline.cmdbuff, s->count,
search_flags, &tm, NULL);
search_flags, &sia);
emsg_off--;
// if interrupted while searching, behave like it failed
if (got_int) {