summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2007-05-31 13:56:35 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2007-05-31 13:56:35 +0000
commit5bcafebbd4556f2b7e3f345d1785c04369774b30 (patch)
tree3c7def4a8423391bd4075d4e60ae5754177948f0 /src/fe-common
parentd3687d8a973e507db22e1565592c5ebdd7b017c4 (diff)
downloadirssi-5bcafebbd4556f2b7e3f345d1785c04369774b30.zip
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
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/formats.c2
1 files changed, 1 insertions, 1 deletions
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;