diff options
| author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2015-04-25 13:34:30 -0300 | 
|---|---|---|
| committer | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2015-04-25 13:37:44 -0300 | 
| commit | 0bce4dc54427d05ab320a88f6269a9c1b05ea899 (patch) | |
| tree | 4a3aff2749eb0b70b7947ecfc7cd56d56ad4e29d /src/nvim/getchar.c | |
| parent | d350d12a00518aa0d9e3a1d49c6815c3398d882f (diff) | |
| parent | c96b933acc4d9ec7382d451055e44c85959772b9 (diff) | |
| download | rneovim-0bce4dc54427d05ab320a88f6269a9c1b05ea899.tar.gz rneovim-0bce4dc54427d05ab320a88f6269a9c1b05ea899.tar.bz2 rneovim-0bce4dc54427d05ab320a88f6269a9c1b05ea899.zip | |
Merge #2486: Replacements for vim_iswhite, VIM_ISDIGIT, vim_isdigit, vim_isxdigit, and vim_isspace
Reviewed-by: Michael Reed <m.reed@mykolab.com>
Diffstat (limited to 'src/nvim/getchar.c')
| -rw-r--r-- | src/nvim/getchar.c | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index f45ee609bd..1951cd6737 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -771,7 +771,7 @@ int start_redo(long count, int old_redo)    /* try to enter the count (in place of a previous count) */    if (count) { -    while (VIM_ISDIGIT(c))      /* skip "old" count */ +    while (ascii_isdigit(c))      /* skip "old" count */        c = read_redo(FALSE, old_redo);      add_num_buff(&readbuf2, count);    } @@ -2129,7 +2129,7 @@ static int vgetorpeek(int advance)                  col = vcol = curwin->w_wcol = 0;                  ptr = get_cursor_line_ptr();                  while (col < curwin->w_cursor.col) { -                  if (!vim_iswhite(ptr[col])) +                  if (!ascii_iswhite(ptr[col]))                      curwin->w_wcol = vcol;                    vcol += lbr_chartabsize(ptr, ptr + col,                        (colnr_T)vcol); @@ -2672,7 +2672,7 @@ do_map (     */    p = keys;    do_backslash = (vim_strchr(p_cpo, CPO_BSLASH) == NULL); -  while (*p && (maptype == 1 || !vim_iswhite(*p))) { +  while (*p && (maptype == 1 || !ascii_iswhite(*p))) {      if ((p[0] == Ctrl_V || (do_backslash && p[0] == '\\')) &&          p[1] != NUL)        ++p;                      /* skip CTRL-V or backslash */ @@ -2761,7 +2761,7 @@ do_map (            }        /* An abbreviation cannot contain white space. */        for (n = 0; n < len; ++n) -        if (vim_iswhite(keys[n])) { +        if (ascii_iswhite(keys[n])) {            retval = 1;            goto theend;          } @@ -3568,7 +3568,7 @@ int check_abbr(int c, char_u *ptr, int col, int mincol)      clen = 1;      while (p > ptr + mincol) {        p = mb_prevptr(ptr, p); -      if (vim_isspace(*p) || (!vim_abbr && is_id != vim_iswordp(p))) { +      if (ascii_isspace(*p) || (!vim_abbr && is_id != vim_iswordp(p))) {          p += (*mb_ptr2len)(p);          break;        } @@ -3583,7 +3583,7 @@ int check_abbr(int c, char_u *ptr, int col, int mincol)        if (col > 1)          is_id = vim_iswordc(ptr[col - 2]);      } -    for (scol = col - 1; scol > 0 && !vim_isspace(ptr[scol - 1]) +    for (scol = col - 1; scol > 0 && !ascii_isspace(ptr[scol - 1])           && (vim_abbr || is_id == vim_iswordc(ptr[scol - 1])); --scol)        ;    } @@ -4074,7 +4074,7 @@ int put_escstr(FILE *fd, char_u *strstart, int what)       * interpreted as the start of a special key name.       * A space in the lhs of a :map needs a CTRL-V.       */ -    if (what == 2 && (vim_iswhite(c) || c == '"' || c == '\\')) { +    if (what == 2 && (ascii_iswhite(c) || c == '"' || c == '\\')) {        if (putc('\\', fd) < 0)          return FAIL;      } else if (c < ' ' || c > '~' || c == '|' | 
