Fixes for Chinese multibyte characters handling and cursor movement, patch

by Wang WenRui


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3244 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2004-03-24 17:28:55 +00:00 committed by cras
commit db705a8396
5 changed files with 143 additions and 61 deletions

View file

@ -435,7 +435,12 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
unichar chr = get_utf8_char(&end, 6);
char_width = utf8_width(chr);
} else {
char_width = 1;
if (term_type == TERM_TYPE_BIG5 &&
is_big5(end[0], end[1]))
char_width = 2;
else
char_width = 1;
end += char_width-1;
}
xpos += char_width;