mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-24 02:02:45 +03:00
chars: speed up the determination of length and width for plain ASCII
This commit is contained in:
parent
7d38379919
commit
c5955d14ce
@ -207,7 +207,7 @@ char control_mbrep(const char *c, bool isdata)
|
||||
int length_of_char(const char *c, int *width)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
if (use_utf8 && (signed char)*c < 0) {
|
||||
wchar_t wc;
|
||||
int charlen = mbtowc(&wc, c, MAXCHARLEN);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user