aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/spellfile.c
diff options
context:
space:
mode:
authorZviRackover <zvirack@gmail.com>2018-09-02 01:36:18 +0300
committerZviRackover <zvirack@gmail.com>2018-09-09 10:45:50 +0300
commitac13e65ae0ce98516e816ba4fcf468d19e750c30 (patch)
treee039a2201ece3358068a659b4bb84b204afd866b /src/nvim/spellfile.c
parentcbdbc4f63d68a6b17b9eea5c67130e37d3d0f278 (diff)
downloadrneovim-ac13e65ae0ce98516e816ba4fcf468d19e750c30.tar.gz
rneovim-ac13e65ae0ce98516e816ba4fcf468d19e750c30.tar.bz2
rneovim-ac13e65ae0ce98516e816ba4fcf468d19e750c30.zip
Remove has_mbytes local to lines changed in parent commit
Diffstat (limited to 'src/nvim/spellfile.c')
-rw-r--r--src/nvim/spellfile.c10
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>