mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00
Replace VIM_ISDIGIT() and vim_isdigit() with ascii_isdigit() defined in ascii.h
This commit is contained in:
@@ -1006,7 +1006,7 @@ int do_search(
|
||||
* offset, because it is meaningless and the 's' could be a
|
||||
* substitute command.
|
||||
*/
|
||||
if (*p == '+' || *p == '-' || VIM_ISDIGIT(*p))
|
||||
if (*p == '+' || *p == '-' || ascii_isdigit(*p))
|
||||
spats[0].off.line = TRUE;
|
||||
else if ((options & SEARCH_OPT) &&
|
||||
(*p == 'e' || *p == 's' || *p == 'b')) {
|
||||
@@ -1014,16 +1014,16 @@ int do_search(
|
||||
spats[0].off.end = SEARCH_END;
|
||||
++p;
|
||||
}
|
||||
if (VIM_ISDIGIT(*p) || *p == '+' || *p == '-') { /* got an offset */
|
||||
if (ascii_isdigit(*p) || *p == '+' || *p == '-') { /* got an offset */
|
||||
/* 'nr' or '+nr' or '-nr' */
|
||||
if (VIM_ISDIGIT(*p) || VIM_ISDIGIT(*(p + 1)))
|
||||
if (ascii_isdigit(*p) || ascii_isdigit(*(p + 1)))
|
||||
spats[0].off.off = atol((char *)p);
|
||||
else if (*p == '-') /* single '-' */
|
||||
spats[0].off.off = -1;
|
||||
else /* single '+' */
|
||||
spats[0].off.off = 1;
|
||||
++p;
|
||||
while (VIM_ISDIGIT(*p)) /* skip number */
|
||||
while (ascii_isdigit(*p)) /* skip number */
|
||||
++p;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user