1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

Even simpler logic

This commit is contained in:
LemonBoy 2015-10-02 15:07:59 +02:00
parent c351c448b8
commit c7646dc58d

View File

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