Mercurial > vim
comparison src/search.c @ 11127:506f5d8b7d8b v8.0.0451
patch 8.0.0451: some macros are in lower case
commit https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 12 19:22:36 2017 +0100
patch 8.0.0451: some macros are in lower case
Problem: Some macros are in lower case.
Solution: Make a few more macros upper case. Avoid lower case macros use an
argument twice.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 12 Mar 2017 19:30:05 +0100 |
parents | 778c10516955 |
children | f4ea50924c6d |
comparison
equal
deleted
inserted
replaced
11126:48599a3eae0b | 11127:506f5d8b7d8b |
---|---|
3826 { | 3826 { |
3827 char_u *lp = NULL; | 3827 char_u *lp = NULL; |
3828 | 3828 |
3829 /* We search forward until the cursor, because searching backwards is | 3829 /* We search forward until the cursor, because searching backwards is |
3830 * very slow for DBCS encodings. */ | 3830 * very slow for DBCS encodings. */ |
3831 for (p = line; p < line + curwin->w_cursor.col; mb_ptr_adv(p)) | 3831 for (p = line; p < line + curwin->w_cursor.col; MB_PTR_ADV(p)) |
3832 if (*p == '>' || *p == '<') | 3832 if (*p == '>' || *p == '<') |
3833 { | 3833 { |
3834 lc = *p; | 3834 lc = *p; |
3835 lp = p; | 3835 lp = p; |
3836 } | 3836 } |
3846 { | 3846 { |
3847 for (p = line + curwin->w_cursor.col; p > line; ) | 3847 for (p = line + curwin->w_cursor.col; p > line; ) |
3848 { | 3848 { |
3849 if (*p == '<') /* find '<' under/before cursor */ | 3849 if (*p == '<') /* find '<' under/before cursor */ |
3850 break; | 3850 break; |
3851 mb_ptr_back(line, p); | 3851 MB_PTR_BACK(line, p); |
3852 if (*p == '>') /* find '>' before cursor */ | 3852 if (*p == '>') /* find '>' before cursor */ |
3853 break; | 3853 break; |
3854 } | 3854 } |
3855 if (*p != '<') | 3855 if (*p != '<') |
3856 return FALSE; | 3856 return FALSE; |
3857 } | 3857 } |
3858 | 3858 |
3859 pos.lnum = curwin->w_cursor.lnum; | 3859 pos.lnum = curwin->w_cursor.lnum; |
3860 pos.col = (colnr_T)(p - line); | 3860 pos.col = (colnr_T)(p - line); |
3861 | 3861 |
3862 mb_ptr_adv(p); | 3862 MB_PTR_ADV(p); |
3863 if (end_tag) | 3863 if (end_tag) |
3864 /* check that there is a '/' after the '<' */ | 3864 /* check that there is a '/' after the '<' */ |
3865 return *p == '/'; | 3865 return *p == '/'; |
3866 | 3866 |
3867 /* check that there is no '/' after the '<' */ | 3867 /* check that there is no '/' after the '<' */ |
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; |