BIG5 fixes by vanilla@FreeBSD.org(?)

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3134 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2003-10-19 19:09:51 +00:00 committed by cras
commit 7eb2fc70e3
6 changed files with 94 additions and 11 deletions

View file

@ -199,8 +199,12 @@ view_update_line_cache(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line)
}
if (!view->utf8) {
next_ptr = ptr+1;
char_len = 1;
/* MH */
if (ptr[1] == '\0' || !is_big5(ptr[0], ptr[1]))
char_len = 1;
else
char_len = 2;
next_ptr = ptr+char_len;
} else {
char_len = 1;
while (ptr[char_len] != '\0' && char_len < 6)
@ -251,7 +255,11 @@ view_update_line_cache(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line)
continue;
}
if (*ptr == ' ') {
if (!view->utf8 && char_len > 1) {
last_space = xpos;
last_space_ptr = next_ptr;
last_color = color;
} else if (*ptr == ' ') {
last_space = xpos;
last_space_ptr = ptr;
last_color = color;