From 6ec65d5500330736317664ecd58414db78f724c9 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg <bensberg@justemail.net> Date: Thu, 6 Apr 2017 17:31:36 +0200 Subject: [PATCH] display: check the correct character for being double-width This fixes https://savannah.gnu.org/bugs/?50741. --- src/winio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/winio.c b/src/winio.c index 757ce534..c26a2ff5 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1932,7 +1932,7 @@ char *display_string(const char *buf, size_t start_col, size_t span, #ifdef ENABLE_UTF8 /* Display the left half of a two-column character as '>'. */ - if (using_utf8() && mbwidth(buf) == 2) + if (mbwidth(converted + index) == 2) converted[index++] = '>'; #endif } -- GitLab