diff --git a/ChangeLog b/ChangeLog index 161ab3fd..2eff8b04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -175,6 +175,8 @@ CVS code - display_string() - Avoid a memory corruption problem by allocating enough space for len plus a trailing multibyte character and/or tab. (DLR) + - Don't check for multicolumn characters if the NO_UTF8 flag + isn't set. (DLR) nanogetstr() - Rename variable def to curranswer to avoid confusion. (DLR) - Only declare and use the tabbed variable if DISABLE_TABCOMP diff --git a/src/winio.c b/src/winio.c index 7bb7366f..58b94299 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2287,7 +2287,7 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool } } #ifdef NANO_WIDE - else if (mbwidth(buf_mb) > 1) { + else if (!ISSET(NO_UTF8) && mbwidth(buf_mb) > 1) { converted[index++] = ' '; start_col++;