From 5bcafebbd4556f2b7e3f345d1785c04369774b30 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Thu, 31 May 2007 13:56:35 +0000 Subject: Assume width 1 for control characters in places where a non-negative width is expected. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4535 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/formats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fe-common') diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c index 8fba8db5..93ee6211 100644 --- a/src/fe-common/core/formats.c +++ b/src/fe-common/core/formats.c @@ -306,7 +306,7 @@ static int advance (char const **str, gboolean utf8) c = g_utf8_get_char(*str); *str = g_utf8_next_char(*str); - return mk_wcwidth(c); + return unichar_isprint(c) ? mk_wcwidth(c) : 1; } else { *str += 1; -- cgit v1.2.3