diff options
author | Rich Felker <dalias@aerifal.cx> | 2006-10-10 19:00:55 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2006-10-10 19:00:55 +0000 |
commit | 7e80cc8326ccbdde2ce5917941a1e71814be2df1 (patch) | |
tree | 675423783772cb12c0b44291abf747183b0e9771 | |
parent | 0a545de895fb861fac88edea716e0b0a5d52f0ff (diff) |
workaround broken glibc wcwidth
-rw-r--r-- | term.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -377,7 +377,9 @@ static void process_char(struct uuterm *t, unsigned c) escape(t, c); return; } - switch(w=wcwidth(c)) { + if (iswcntrl(c)) w = -1; + else if ((w = wcwidth(c)) < 0) w = 1; + switch(w) { case -1: switch (c) { case 033: |