Mercurial > vim
comparison src/tag.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 | 6e8b7c58c526 |
children | 90e5812af76b |
comparison
equal
deleted
inserted
replaced
18357:ffe2ff94a3e0 | 18358:34d5cd432cac |
---|---|
3540 p_ic = FALSE; /* don't ignore case now */ | 3540 p_ic = FALSE; /* don't ignore case now */ |
3541 p_scs = FALSE; | 3541 p_scs = FALSE; |
3542 save_lnum = curwin->w_cursor.lnum; | 3542 save_lnum = curwin->w_cursor.lnum; |
3543 curwin->w_cursor.lnum = 0; /* start search before first line */ | 3543 curwin->w_cursor.lnum = 0; /* start search before first line */ |
3544 if (do_search(NULL, pbuf[0], pbuf + 1, (long)1, | 3544 if (do_search(NULL, pbuf[0], pbuf + 1, (long)1, |
3545 search_options, NULL, NULL)) | 3545 search_options, NULL)) |
3546 retval = OK; | 3546 retval = OK; |
3547 else | 3547 else |
3548 { | 3548 { |
3549 int found = 1; | 3549 int found = 1; |
3550 int cc; | 3550 int cc; |
3552 /* | 3552 /* |
3553 * try again, ignore case now | 3553 * try again, ignore case now |
3554 */ | 3554 */ |
3555 p_ic = TRUE; | 3555 p_ic = TRUE; |
3556 if (!do_search(NULL, pbuf[0], pbuf + 1, (long)1, | 3556 if (!do_search(NULL, pbuf[0], pbuf + 1, (long)1, |
3557 search_options, NULL, NULL)) | 3557 search_options, NULL)) |
3558 { | 3558 { |
3559 /* | 3559 /* |
3560 * Failed to find pattern, take a guess: "^func (" | 3560 * Failed to find pattern, take a guess: "^func (" |
3561 */ | 3561 */ |
3562 found = 2; | 3562 found = 2; |
3563 (void)test_for_static(&tagp); | 3563 (void)test_for_static(&tagp); |
3564 cc = *tagp.tagname_end; | 3564 cc = *tagp.tagname_end; |
3565 *tagp.tagname_end = NUL; | 3565 *tagp.tagname_end = NUL; |
3566 sprintf((char *)pbuf, "^%s\\s\\*(", tagp.tagname); | 3566 sprintf((char *)pbuf, "^%s\\s\\*(", tagp.tagname); |
3567 if (!do_search(NULL, '/', pbuf, (long)1, | 3567 if (!do_search(NULL, '/', pbuf, (long)1, |
3568 search_options, NULL, NULL)) | 3568 search_options, NULL)) |
3569 { | 3569 { |
3570 /* Guess again: "^char * \<func (" */ | 3570 /* Guess again: "^char * \<func (" */ |
3571 sprintf((char *)pbuf, "^\\[#a-zA-Z_]\\.\\*\\<%s\\s\\*(", | 3571 sprintf((char *)pbuf, "^\\[#a-zA-Z_]\\.\\*\\<%s\\s\\*(", |
3572 tagp.tagname); | 3572 tagp.tagname); |
3573 if (!do_search(NULL, '/', pbuf, (long)1, | 3573 if (!do_search(NULL, '/', pbuf, (long)1, |
3574 search_options, NULL, NULL)) | 3574 search_options, NULL)) |
3575 found = 0; | 3575 found = 0; |
3576 } | 3576 } |
3577 *tagp.tagname_end = cc; | 3577 *tagp.tagname_end = cc; |
3578 } | 3578 } |
3579 if (found == 0) | 3579 if (found == 0) |