Mercurial > vim
comparison src/search.c @ 11129:f4ea50924c6d v8.0.0452
patch 8.0.0452: some macros are in lower case
commit https://github.com/vim/vim/commit/1c46544412382db8b3203d6c78e550df885540bd
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 12 20:10:05 2017 +0100
patch 8.0.0452: some macros are in lower case
Problem: Some macros are in lower case.
Solution: Make a few more macros upper case.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 12 Mar 2017 20:15:06 +0100 |
parents | 506f5d8b7d8b |
children | 501f46f7644c |
comparison
equal
deleted
inserted
replaced
11128:23154628ab7f | 11129:f4ea50924c6d |
---|---|
3274 int c; | 3274 int c; |
3275 | 3275 |
3276 while (decl(posp) != -1) | 3276 while (decl(posp) != -1) |
3277 { | 3277 { |
3278 c = gchar_pos(posp); | 3278 c = gchar_pos(posp); |
3279 if (!vim_iswhite(c)) | 3279 if (!VIM_ISWHITE(c)) |
3280 { | 3280 { |
3281 incl(posp); | 3281 incl(posp); |
3282 break; | 3282 break; |
3283 } | 3283 } |
3284 } | 3284 } |
3513 at_start_sent = TRUE; | 3513 at_start_sent = TRUE; |
3514 decl(&pos); | 3514 decl(&pos); |
3515 while (LT_POS(pos, curwin->w_cursor)) | 3515 while (LT_POS(pos, curwin->w_cursor)) |
3516 { | 3516 { |
3517 c = gchar_pos(&pos); | 3517 c = gchar_pos(&pos); |
3518 if (!vim_iswhite(c)) | 3518 if (!VIM_ISWHITE(c)) |
3519 { | 3519 { |
3520 at_start_sent = FALSE; | 3520 at_start_sent = FALSE; |
3521 break; | 3521 break; |
3522 } | 3522 } |
3523 incl(&pos); | 3523 incl(&pos); |
3536 while (count--) | 3536 while (count--) |
3537 { | 3537 { |
3538 if (at_start_sent) | 3538 if (at_start_sent) |
3539 find_first_blank(&curwin->w_cursor); | 3539 find_first_blank(&curwin->w_cursor); |
3540 c = gchar_cursor(); | 3540 c = gchar_cursor(); |
3541 if (!at_start_sent || (!include && !vim_iswhite(c))) | 3541 if (!at_start_sent || (!include && !VIM_ISWHITE(c))) |
3542 findsent(BACKWARD, 1L); | 3542 findsent(BACKWARD, 1L); |
3543 at_start_sent = !at_start_sent; | 3543 at_start_sent = !at_start_sent; |
3544 } | 3544 } |
3545 } | 3545 } |
3546 else | 3546 else |
3559 { | 3559 { |
3560 at_start_sent = FALSE; | 3560 at_start_sent = FALSE; |
3561 while (LT_POS(pos, curwin->w_cursor)) | 3561 while (LT_POS(pos, curwin->w_cursor)) |
3562 { | 3562 { |
3563 c = gchar_pos(&pos); | 3563 c = gchar_pos(&pos); |
3564 if (!vim_iswhite(c)) | 3564 if (!VIM_ISWHITE(c)) |
3565 { | 3565 { |
3566 at_start_sent = TRUE; | 3566 at_start_sent = TRUE; |
3567 break; | 3567 break; |
3568 } | 3568 } |
3569 incl(&pos); | 3569 incl(&pos); |
3585 | 3585 |
3586 /* | 3586 /* |
3587 * If the cursor started on a blank, check if it is just before the start | 3587 * If the cursor started on a blank, check if it is just before the start |
3588 * of the next sentence. | 3588 * of the next sentence. |
3589 */ | 3589 */ |
3590 while (c = gchar_pos(&pos), vim_iswhite(c)) /* vim_iswhite() is a macro */ | 3590 while (c = gchar_pos(&pos), VIM_ISWHITE(c)) /* VIM_ISWHITE() is a macro */ |
3591 incl(&pos); | 3591 incl(&pos); |
3592 if (EQUAL_POS(pos, curwin->w_cursor)) | 3592 if (EQUAL_POS(pos, curwin->w_cursor)) |
3593 { | 3593 { |
3594 start_blank = TRUE; | 3594 start_blank = TRUE; |
3595 find_first_blank(&start_pos); /* go back to first blank */ | 3595 find_first_blank(&start_pos); /* go back to first blank */ |
3621 * If there are no trailing blanks, try to include leading blanks. | 3621 * If there are no trailing blanks, try to include leading blanks. |
3622 */ | 3622 */ |
3623 if (start_blank) | 3623 if (start_blank) |
3624 { | 3624 { |
3625 find_first_blank(&curwin->w_cursor); | 3625 find_first_blank(&curwin->w_cursor); |
3626 c = gchar_pos(&curwin->w_cursor); /* vim_iswhite() is a macro */ | 3626 c = gchar_pos(&curwin->w_cursor); /* VIM_ISWHITE() is a macro */ |
3627 if (vim_iswhite(c)) | 3627 if (VIM_ISWHITE(c)) |
3628 decl(&curwin->w_cursor); | 3628 decl(&curwin->w_cursor); |
3629 } | 3629 } |
3630 else if (c = gchar_cursor(), !vim_iswhite(c)) | 3630 else if (c = gchar_cursor(), !VIM_ISWHITE(c)) |
3631 find_first_blank(&start_pos); | 3631 find_first_blank(&start_pos); |
3632 } | 3632 } |
3633 | 3633 |
3634 if (VIsual_active) | 3634 if (VIsual_active) |
3635 { | 3635 { |
3972 /* | 3972 /* |
3973 * Search for matching "</aaa>". First isolate the "aaa". | 3973 * Search for matching "</aaa>". First isolate the "aaa". |
3974 */ | 3974 */ |
3975 inc_cursor(); | 3975 inc_cursor(); |
3976 p = ml_get_cursor(); | 3976 p = ml_get_cursor(); |
3977 for (cp = p; *cp != NUL && *cp != '>' && !vim_iswhite(*cp); MB_PTR_ADV(cp)) | 3977 for (cp = p; *cp != NUL && *cp != '>' && !VIM_ISWHITE(*cp); MB_PTR_ADV(cp)) |
3978 ; | 3978 ; |
3979 len = (int)(cp - p); | 3979 len = (int)(cp - p); |
3980 if (len == 0) | 3980 if (len == 0) |
3981 { | 3981 { |
3982 curwin->w_cursor = old_pos; | 3982 curwin->w_cursor = old_pos; |
4494 | 4494 |
4495 /* When "include" is TRUE, include spaces after closing quote or before | 4495 /* When "include" is TRUE, include spaces after closing quote or before |
4496 * the starting quote. */ | 4496 * the starting quote. */ |
4497 if (include) | 4497 if (include) |
4498 { | 4498 { |
4499 if (vim_iswhite(line[col_end + 1])) | 4499 if (VIM_ISWHITE(line[col_end + 1])) |
4500 while (vim_iswhite(line[col_end + 1])) | 4500 while (VIM_ISWHITE(line[col_end + 1])) |
4501 ++col_end; | 4501 ++col_end; |
4502 else | 4502 else |
4503 while (col_start > 0 && vim_iswhite(line[col_start - 1])) | 4503 while (col_start > 0 && VIM_ISWHITE(line[col_start - 1])) |
4504 --col_start; | 4504 --col_start; |
4505 } | 4505 } |
4506 | 4506 |
4507 /* Set start position. After vi" another i" must include the ". | 4507 /* Set start position. After vi" another i" must include the ". |
4508 * For v2i" include the quotes. */ | 4508 * For v2i" include the quotes. */ |