diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-06-11 23:43:14 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-06-12 02:00:50 -0400 |
commit | 3c7ea8d619d77d303e9c51118b22c81a3ffbf550 (patch) | |
tree | ef78d44a18dca24302546d98a67861940d471e5f /src/nvim/search.c | |
parent | fa2ad305e312c3e61e4943c345a4c34d4a1be18c (diff) | |
download | rneovim-3c7ea8d619d77d303e9c51118b22c81a3ffbf550.tar.gz rneovim-3c7ea8d619d77d303e9c51118b22c81a3ffbf550.tar.bz2 rneovim-3c7ea8d619d77d303e9c51118b22c81a3ffbf550.zip |
vim-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.
https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r-- | src/nvim/search.c | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index cb59eb6d04..6c974850ac 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -3239,35 +3239,41 @@ static int in_html_tag(int end_tag) /* We search forward until the cursor, because searching backwards is * very slow for DBCS encodings. */ - for (p = line; p < line + curwin->w_cursor.col; mb_ptr_adv(p)) + for (p = line; p < line + curwin->w_cursor.col; MB_PTR_ADV(p)) { if (*p == '>' || *p == '<') { lc = *p; lp = p; } - if (*p != '<') { /* check for '<' under cursor */ - if (lc != '<') - return FALSE; + } + if (*p != '<') { // check for '<' under cursor + if (lc != '<') { + return false; + } p = lp; } } else { for (p = line + curwin->w_cursor.col; p > line; ) { - if (*p == '<') /* find '<' under/before cursor */ + if (*p == '<') { // find '<' under/before cursor break; - mb_ptr_back(line, p); - if (*p == '>') /* find '>' before cursor */ + } + MB_PTR_BACK(line, p); + if (*p == '>') { // find '>' before cursor break; + } + } + if (*p != '<') { + return false; } - if (*p != '<') - return FALSE; } pos.lnum = curwin->w_cursor.lnum; pos.col = (colnr_T)(p - line); - mb_ptr_adv(p); - if (end_tag) - /* check that there is a '/' after the '<' */ + MB_PTR_ADV(p); + if (end_tag) { + // check that there is a '/' after the '<' return *p == '/'; + } /* check that there is no '/' after the '<' */ if (*p == '/') @@ -3371,8 +3377,10 @@ again: */ inc_cursor(); p = get_cursor_pos_ptr(); - for (cp = p; *cp != NUL && *cp != '>' && !ascii_iswhite(*cp); mb_ptr_adv(cp)) - ; + for (cp = p; + *cp != NUL && *cp != '>' && !ascii_iswhite(*cp); + MB_PTR_ADV(cp)) { + } len = (int)(cp - p); if (len == 0) { curwin->w_cursor = old_pos; |