A bit more better utf8 support, still not a good input line.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2355 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-01-29 03:13:06 +00:00 committed by cras
commit 2c3216d10c
4 changed files with 54 additions and 21 deletions

View file

@ -396,17 +396,14 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
}
if (xpos < term_width) {
if ((*text & 127) >= 32) {
if (view->utf8) {
/* UTF8 - print multiple chars */
const unsigned char *end = text;
const unsigned char *end = text;
if (view->utf8)
get_utf8_char(&end);
get_utf8_char(&end);
while (text < end) {
term_addch(view->window, *text);
text++;
}
}
if (*text >= 32 &&
(end != text || (*text & 127) >= 32)) {
for (; text < end; text++)
term_addch(view->window, *text);
term_addch(view->window, *text);
} else {
/* low-ascii */