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.
91acfffc1e
This commit is contained in:
Jan Edmund Lazo
2018-06-11 23:43:14 -04:00
parent fa2ad305e3
commit 3c7ea8d619
33 changed files with 426 additions and 342 deletions

View File

@@ -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;