mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user