comparison src/ex_getln.c @ 18358:34d5cd432cac v8.1.2173

patch 8.1.2173: searchit() has too many arguments Commit: https://github.com/vim/vim/commit/92ea26b925a0835badb0af2d5887238a4198cabb Author: Bram Moolenaar <Bram@vim.org> Date: Fri Oct 18 20:53:34 2019 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Fri, 18 Oct 2019 21:00:04 +0200
parents 9f51d0cef8da
children 71199e360948
comparison
equal deleted inserted replaced
18357:ffe2ff94a3e0 18358:34d5cd432cac
371 int skiplen, patlen; 371 int skiplen, patlen;
372 int found; // do_search() result 372 int found; // do_search() result
373 pos_T end_pos; 373 pos_T end_pos;
374 #ifdef FEAT_RELTIME 374 #ifdef FEAT_RELTIME
375 proftime_T tm; 375 proftime_T tm;
376 searchit_arg_T sia;
376 #endif 377 #endif
377 int next_char; 378 int next_char;
378 int use_last_pat; 379 int use_last_pat;
379 int did_do_incsearch = is_state->did_incsearch; 380 int did_do_incsearch = is_state->did_incsearch;
380 381
443 if (!p_hls) 444 if (!p_hls)
444 search_flags += SEARCH_KEEP; 445 search_flags += SEARCH_KEEP;
445 if (search_first_line != 0) 446 if (search_first_line != 0)
446 search_flags += SEARCH_START; 447 search_flags += SEARCH_START;
447 ccline.cmdbuff[skiplen + patlen] = NUL; 448 ccline.cmdbuff[skiplen + patlen] = NUL;
449 #ifdef FEAT_RELTIME
450 vim_memset(&sia, 0, sizeof(sia));
451 sia.sa_tm = &tm;
452 #endif
448 found = do_search(NULL, firstc == ':' ? '/' : firstc, 453 found = do_search(NULL, firstc == ':' ? '/' : firstc,
449 ccline.cmdbuff + skiplen, count, search_flags, 454 ccline.cmdbuff + skiplen, count, search_flags,
450 #ifdef FEAT_RELTIME 455 #ifdef FEAT_RELTIME
451 &tm, NULL 456 &sia
452 #else 457 #else
453 NULL, NULL 458 NULL
454 #endif 459 #endif
455 ); 460 );
456 ccline.cmdbuff[skiplen + patlen] = next_char; 461 ccline.cmdbuff[skiplen + patlen] = next_char;
457 --emsg_off; 462 --emsg_off;
458 463
595 ++emsg_off; 600 ++emsg_off;
596 save = pat[patlen]; 601 save = pat[patlen];
597 pat[patlen] = NUL; 602 pat[patlen] = NUL;
598 i = searchit(curwin, curbuf, &t, NULL, 603 i = searchit(curwin, curbuf, &t, NULL,
599 c == Ctrl_G ? FORWARD : BACKWARD, 604 c == Ctrl_G ? FORWARD : BACKWARD,
600 pat, count, search_flags, 605 pat, count, search_flags, RE_SEARCH, NULL);
601 RE_SEARCH, 0, NULL, NULL);
602 --emsg_off; 606 --emsg_off;
603 pat[patlen] = save; 607 pat[patlen] = save;
604 if (i) 608 if (i)
605 { 609 {
606 is_state->search_start = is_state->match_start; 610 is_state->search_start = is_state->match_start;