summaryrefslogtreecommitdiff
path: root/chinese/irssi/files/patch-src::fe-text::gui-readline.c
blob: 5b514efc4cf8cd44ec4c735f25586a6c33d2c49c (plain) (blame)
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
--- src/fe-text/gui-readline.c.orig	Mon Nov 11 15:00:02 2002
+++ src/fe-text/gui-readline.c	Tue Apr  1 09:47:02 2003
@@ -50,6 +50,10 @@
 static ENTRY_REDIRECT_REC *redir;
 static int escape_next_key;
 
+static int big5high = FALSE;
+static unichar prekey = '\0';
+
+
 static int readtag;
 static time_t idle_time;
 
@@ -148,7 +152,25 @@
 
 	idle_time = time(NULL);
 
-	if (key < 32) {
+        if(big5high || is_big5_hi(key))
+        {
+          if(big5high)
+          {
+            big5high = FALSE;
+            str[0] = prekey;
+            str[1] = key;
+            str[2] = '\0';
+            gui_entry_insert_text(active_entry, str);
+            return;
+          }
+          else
+          {
+            big5high = TRUE;
+            prekey = key;
+            return;
+          }
+        }
+	else if (key < 32) {
 		/* control key */
                 str[0] = '^';
 		str[1] = (char)key+'@';