diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2015-04-22 19:12:26 -0300 |
---|---|---|
committer | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2015-04-24 20:37:13 -0300 |
commit | 93bf201119f68b0723ee3f240afa48134cc41399 (patch) | |
tree | e314c40921aa19141cc68b6f6af3e23fa2ca2ef8 /src/nvim/spell.c | |
parent | d350d12a00518aa0d9e3a1d49c6815c3398d882f (diff) | |
download | rneovim-93bf201119f68b0723ee3f240afa48134cc41399.tar.gz rneovim-93bf201119f68b0723ee3f240afa48134cc41399.tar.bz2 rneovim-93bf201119f68b0723ee3f240afa48134cc41399.zip |
Replace vim_iswhite with ascii_iswhite() defined in ascii.h
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 7b38b540cb..8cfe1c8c9a 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -9501,7 +9501,7 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so fword_ends = (fword[sp->ts_fidx] == NUL || (soundfold - ? vim_iswhite(fword[sp->ts_fidx]) + ? ascii_iswhite(fword[sp->ts_fidx]) : !spell_iswordp(fword + sp->ts_fidx, curwin))); tword[sp->ts_twordlen] = NUL; @@ -10915,7 +10915,7 @@ stp_sal_score ( // sounds like "t h" while "the" sounds like "@". Avoid that by // removing the space. Don't do it when the good word also contains a // space. - if (vim_iswhite(su->su_badptr[su->su_badlen]) + if (ascii_iswhite(su->su_badptr[su->su_badlen]) && *skiptowhite(stp->st_word) == NUL) for (p = fword; *(p = skiptowhite(p)) != NUL; ) STRMOVE(p, p + 1); @@ -11695,7 +11695,7 @@ static void spell_soundfold_sofo(slang_T *slang, char_u *inword, char_u *res) // 255, sl_sal the rest. for (s = inword; *s != NUL; ) { c = mb_cptr2char_adv(&s); - if (enc_utf8 ? utf_class(c) == 0 : vim_iswhite(c)) + if (enc_utf8 ? utf_class(c) == 0 : ascii_iswhite(c)) c = ' '; else if (c < 256) c = slang->sl_sal_first[c]; @@ -11727,7 +11727,7 @@ static void spell_soundfold_sofo(slang_T *slang, char_u *inword, char_u *res) } else { // The sl_sal_first[] table contains the translation. for (s = inword; (c = *s) != NUL; ++s) { - if (vim_iswhite(c)) + if (ascii_iswhite(c)) c = ' '; else c = slang->sl_sal_first[c]; @@ -11762,7 +11762,7 @@ static void spell_soundfold_sal(slang_T *slang, char_u *inword, char_u *res) if (slang->sl_rem_accents) { t = word; while (*s != NUL) { - if (vim_iswhite(*s)) { + if (ascii_iswhite(*s)) { *t++ = ' '; s = skipwhite(s); } else { @@ -11955,7 +11955,7 @@ static void spell_soundfold_sal(slang_T *slang, char_u *inword, char_u *res) break; } } - } else if (vim_iswhite(c)) { + } else if (ascii_iswhite(c)) { c = ' '; k = 1; } @@ -12010,7 +12010,7 @@ static void spell_soundfold_wsal(slang_T *slang, char_u *inword, char_u *res) t = s; c = mb_cptr2char_adv(&s); if (slang->sl_rem_accents) { - if (enc_utf8 ? utf_class(c) == 0 : vim_iswhite(c)) { + if (enc_utf8 ? utf_class(c) == 0 : ascii_iswhite(c)) { if (did_white) continue; c = ' '; @@ -12221,7 +12221,7 @@ static void spell_soundfold_wsal(slang_T *slang, char_u *inword, char_u *res) break; } } - } else if (vim_iswhite(c)) { + } else if (ascii_iswhite(c)) { c = ' '; k = 1; } |