summaryrefslogtreecommitdiff
path: root/src/fe-text/textbuffer-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-text/textbuffer-view.c')
-rw-r--r--src/fe-text/textbuffer-view.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c
index 8eddae2f..589e2c91 100644
--- a/src/fe-text/textbuffer-view.c
+++ b/src/fe-text/textbuffer-view.c
@@ -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;