diff options
author | Timo Sirainen <cras@irssi.org> | 2004-03-24 17:28:55 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2004-03-24 17:28:55 +0000 |
commit | db705a83964ddf3a19c013b5de6d05cb23a6eb11 (patch) | |
tree | 0ed2f46dea0face48c1e4d2bfd5bc1ec7c36336a /src/fe-text/textbuffer-view.c | |
parent | c6141f11448e52afffe504b80c00042be0afbfec (diff) | |
download | irssi-db705a83964ddf3a19c013b5de6d05cb23a6eb11.zip |
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
Diffstat (limited to 'src/fe-text/textbuffer-view.c')
-rw-r--r-- | src/fe-text/textbuffer-view.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c index f479f8c0..c0853d8d 100644 --- a/src/fe-text/textbuffer-view.c +++ b/src/fe-text/textbuffer-view.c @@ -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; |