1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
--- src/fe-text/gui-readline.c.orig Thu Nov 27 01:30:03 2003
+++ src/fe-text/gui-readline.c Thu Apr 29 14:33:01 2004
@@ -187,7 +187,12 @@
out[utf16_char_to_utf8(arr[i], out)] = '\0';
g_string_append(str, out);
} else {
- g_string_append_c(str, arr[i]);
+ if(term_type==TERM_TYPE_BIG5) {
+ if(arr[i]>0xff)
+ g_string_append_c(str, arr[i]>>8&0xff);
+ g_string_append_c(str, arr[i]&0xff);
+ } else
+ g_string_append_c(str, arr[i]);
}
}
@@ -620,15 +625,13 @@
char *text, *line;
int pos;
- pos = gui_entry_get_pos(active_entry);
-
- text = gui_entry_get_text(active_entry);
+ text = gui_entry_get_text_and_pos(active_entry, &pos);
line = word_complete(active_win, text, &pos, erase);
g_free(text);
if (line != NULL) {
gui_entry_set_text(active_entry, line);
- gui_entry_set_pos(active_entry, pos);
+ gui_entry_set_linepos(active_entry, pos);
g_free(line);
}
}
@@ -648,15 +651,13 @@
char *text, *line;
int pos;
- pos = gui_entry_get_pos(active_entry);
-
- text = gui_entry_get_text(active_entry);
+ text = gui_entry_get_text_and_pos(active_entry, &pos);
line = auto_word_complete(text, &pos);
g_free(text);
if (line != NULL) {
gui_entry_set_text(active_entry, line);
- gui_entry_set_pos(active_entry, pos);
+ gui_entry_set_linepos(active_entry, pos);
g_free(line);
}
}
|