mirror of
https://github.com/irssi/irssi.git
synced 2026-08-14 22:22:15 +02:00
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:
parent
6122035f2f
commit
7eb2fc70e3
6 changed files with 94 additions and 11 deletions
|
|
@ -50,6 +50,10 @@ static KEYBOARD_REC *keyboard;
|
|||
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,6 +152,20 @@ static void sig_gui_key_pressed(gpointer keyp)
|
|||
|
||||
idle_time = time(NULL);
|
||||
|
||||
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);
|
||||
} else {
|
||||
big5high = TRUE;
|
||||
prekey = key;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (key < 32) {
|
||||
/* control key */
|
||||
str[0] = '^';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue