diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2015-06-26 12:49:14 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2016-11-05 14:49:24 +0100 |
commit | 5072ab9e5b75963d2fa831a6eb84ac04a4182659 (patch) | |
tree | e46907e20ba1c09d6d55b8da2341c89eb0066a18 /src/nvim/fileio.c | |
parent | 4804001aff408558b8dd60ae3ba4cd9b84a5b949 (diff) | |
download | rneovim-5072ab9e5b75963d2fa831a6eb84ac04a4182659.tar.gz rneovim-5072ab9e5b75963d2fa831a6eb84ac04a4182659.tar.bz2 rneovim-5072ab9e5b75963d2fa831a6eb84ac04a4182659.zip |
encoding: cleanup mbyte.c given fixed encoding=utf-8
Eliminate mb_init():
Set "enc_utf" and "has_mbyte" early. Eliminate "enc_unicode" and "enc_latin1like".
init_chartab() and screenalloc() are already invoked elsewhere
in the initialization process.
The EncodingChanged autocmd cannot be triggered.
At initialization, there is no spellfiles to reload
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index c0d4a71b35..0eb475d425 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -4165,9 +4165,8 @@ static bool need_conversion(const char_u *fenc) same_encoding = (enc_flags != 0 && fenc_flags == enc_flags); } if (same_encoding) { - /* Specified encoding matches with 'encoding'. This requires - * conversion when 'encoding' is Unicode but not UTF-8. */ - return enc_unicode != 0; + // Specified file encoding matches UTF-8. + return false; } /* Encodings differ. However, conversion is not needed when 'enc' is any |