diff options
Diffstat (limited to 'src/nvim/spellfile.c')
-rw-r--r-- | src/nvim/spellfile.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c index d8538207af..cc9af6fd80 100644 --- a/src/nvim/spellfile.c +++ b/src/nvim/spellfile.c @@ -1459,10 +1459,7 @@ static int read_compound(FILE *fd, slang_T *slang, int len) } else { // normal char, "[abc]" and '*' are copied as-is if (c == '?' || c == '+' || c == '~') *pp++ = '\\'; // "a?" becomes "a\?", "a+" becomes "a\+" - if (enc_utf8) - pp += utf_char2bytes(c, pp); - else - *pp++ = c; + pp += utf_char2bytes(c, pp); } } @@ -4245,10 +4242,7 @@ static int write_vim_spell(spellinfo_T *spin, char_u *fname) // Form the <folchars> string first, we need to know its length. size_t l = 0; for (size_t i = 128; i < 256; ++i) { - if (has_mbyte) - l += (size_t)utf_char2bytes(spelltab.st_fold[i], folchars + l); - else - folchars[l++] = spelltab.st_fold[i]; + l += (size_t)utf_char2bytes(spelltab.st_fold[i], folchars + l); } put_bytes(fd, 1 + 128 + 2 + l, 4); // <sectionlen> |