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/indent.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/indent.c')
| -rw-r--r-- | src/nvim/indent.c | 19 | 
1 files changed, 10 insertions, 9 deletions
| diff --git a/src/nvim/indent.c b/src/nvim/indent.c index 183456d3f7..d3008185dc 100644 --- a/src/nvim/indent.c +++ b/src/nvim/indent.c @@ -118,7 +118,7 @@ int set_indent(int size, int flags)        ind_done = 0;        // Count as many characters as we can use. -      while (todo > 0 && vim_iswhite(*p)) { +      while (todo > 0 && ascii_iswhite(*p)) {          if (*p == TAB) {            tab_pad = (int)curbuf->b_p_ts - (ind_done % (int)curbuf->b_p_ts); @@ -183,7 +183,7 @@ int set_indent(int size, int flags)    }    // Return if the indent is OK already. -  if (!doit && !vim_iswhite(*p) && !(flags & SIN_INSERT)) { +  if (!doit && !ascii_iswhite(*p) && !(flags & SIN_INSERT)) {      return false;    } @@ -216,7 +216,7 @@ int set_indent(int size, int flags)      // Skip over any additional white space (useful when newindent is less      // than old). -    while (vim_iswhite(*p)) { +    while (ascii_iswhite(*p)) {        p++;      }    } else { @@ -235,7 +235,7 @@ int set_indent(int size, int flags)        p = oldline;        ind_done = 0; -      while (todo > 0 && vim_iswhite(*p)) { +      while (todo > 0 && ascii_iswhite(*p)) {          if (*p == TAB) {            tab_pad = (int)curbuf->b_p_ts - (ind_done % (int)curbuf->b_p_ts); @@ -328,7 +328,7 @@ int copy_indent(int size, char_u *src)      s = src;      // Count/copy the usable portion of the source line. -    while (todo > 0 && vim_iswhite(*s)) { +    while (todo > 0 && ascii_iswhite(*s)) {        if (*s == TAB) {          tab_pad = (int)curbuf->b_p_ts                    - (ind_done % (int)curbuf->b_p_ts); @@ -502,7 +502,7 @@ int inindent(int extra)    char_u      *ptr;    colnr_T col; -  for (col = 0, ptr = get_cursor_line_ptr(); vim_iswhite(*ptr); ++col) { +  for (col = 0, ptr = get_cursor_line_ptr(); ascii_iswhite(*ptr); ++col) {      ptr++;    } @@ -688,7 +688,7 @@ int get_lisp_indent(void)            amount++;            firsttry = amount; -          while (vim_iswhite(*that)) { +          while (ascii_iswhite(*that)) {              amount += lbr_chartabsize(line, that, (colnr_T)amount);              that++;            } @@ -706,7 +706,8 @@ int get_lisp_indent(void)              if (vi_lisp || ((*that != '"') && (*that != '\'')                  && (*that != '#') && ((*that < '0') || (*that > '9')))) { -              while (*that && (!vim_iswhite(*that) || quotecount || parencount) +              while (*that +                     && (!ascii_iswhite(*that) || quotecount || parencount)                       && (!((*that == '(' || *that == '[')                       && !quotecount && !parencount && vi_lisp))) {                  if (*that == '"') { @@ -726,7 +727,7 @@ int get_lisp_indent(void)                }              } -            while (vim_iswhite(*that)) { +            while (ascii_iswhite(*that)) {                amount += lbr_chartabsize(line, that, (colnr_T)amount);                that++;              } | 
