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
This commit is contained in:
Emanuele Giaquinta 2007-05-31 13:56:35 +00:00 committed by exg
commit 5bcafebbd4
4 changed files with 7 additions and 7 deletions

View file

@ -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;