mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
Even simpler logic
This commit is contained in:
parent
c351c448b8
commit
c7646dc58d
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user