diff options
author | LemonBoy <thatlemon@gmail.com> | 2015-10-02 15:07:59 +0200 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2015-10-02 15:07:59 +0200 |
commit | c7646dc58d1e70abc8d2981e08baa83e459affdb (patch) | |
tree | 4c6642f32be71db21fa20b70e1d2616031204d71 /src/fe-text | |
parent | c351c448b8dd2b9759e46c0c6e73ed5ead936ffc (diff) | |
download | irssi-c7646dc58d1e70abc8d2981e08baa83e459affdb.zip |
Even simpler logic
Diffstat (limited to 'src/fe-text')
-rw-r--r-- | src/fe-text/term-terminfo.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c index 2ee69a1c..6d289cfc 100644 --- a/src/fe-text/term-terminfo.c +++ b/src/fe-text/term-terminfo.c @@ -543,18 +543,8 @@ int term_addstr(TERM_WINDOW *window, const char *str) len += unichar_isprint(tmp) ? mk_wcwidth(tmp) : 1; ptr = g_utf8_next_char(ptr); } - } else { - while (*ptr != '\0') { - if (is_big5(ptr[0], ptr[1])) { - tmp = ptr[0] << 8 | ptr[1]; - ptr += 2; - } else { - tmp = *ptr; - ptr += 1; - } - len += (tmp > 0xff) ? 2 : 1; - } - } + } else + len = raw_len; term_printed_text(len); |