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/charset.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/charset.c')
-rw-r--r-- | src/nvim/charset.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c index 61c5b10808..c501b7e83f 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -1612,9 +1612,7 @@ bool vim_islower(int c) return false; } - if (enc_latin1like) { - return (latin1flags[c] & LATIN1LOWER) == LATIN1LOWER; - } + return (latin1flags[c] & LATIN1LOWER) == LATIN1LOWER; } return islower(c); } @@ -1643,9 +1641,7 @@ bool vim_isupper(int c) return false; } - if (enc_latin1like) { - return (latin1flags[c] & LATIN1UPPER) == LATIN1UPPER; - } + return (latin1flags[c] & LATIN1UPPER) == LATIN1UPPER; } return isupper(c); } @@ -1670,9 +1666,7 @@ int vim_toupper(int c) return c; } - if (enc_latin1like) { - return latin1upper[c]; - } + return latin1upper[c]; } return TOUPPER_LOC(c); } @@ -1697,9 +1691,7 @@ int vim_tolower(int c) return c; } - if (enc_latin1like) { - return latin1lower[c]; - } + return latin1lower[c]; } return TOLOWER_LOC(c); } |