diff options
author | vanilla <vanilla@FreeBSD.org> | 2003-04-01 10:03:43 +0800 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2003-04-01 10:03:43 +0800 |
commit | 1cecb776884f167f76e0f177effa18940c9c2012 (patch) | |
tree | 96fbe927ad2245e392c6a2e219ebb912d568f0eb /chinese/irssi/files | |
parent | 069e1c24554d749c64230ae3399a37169426e350 (diff) | |
download | freebsd-ports-gnome-1cecb776884f167f76e0f177effa18940c9c2012.tar.gz freebsd-ports-gnome-1cecb776884f167f76e0f177effa18940c9c2012.tar.zst freebsd-ports-gnome-1cecb776884f167f76e0f177effa18940c9c2012.zip |
Add a patch to fix readline routine problem.
PR: ports/50374
Submitted by: Michael Hsin <mhsin@mhsin.org>
Diffstat (limited to 'chinese/irssi/files')
-rw-r--r-- | chinese/irssi/files/patch-src::fe-text::gui-readline.c | 45 |
1 files changed, 37 insertions, 8 deletions
diff --git a/chinese/irssi/files/patch-src::fe-text::gui-readline.c b/chinese/irssi/files/patch-src::fe-text::gui-readline.c index 2b7e026bc7a7..5b514efc4cf8 100644 --- a/chinese/irssi/files/patch-src::fe-text::gui-readline.c +++ b/chinese/irssi/files/patch-src::fe-text::gui-readline.c @@ -1,11 +1,40 @@ --- src/fe-text/gui-readline.c.orig Mon Nov 11 15:00:02 2002 -+++ src/fe-text/gui-readline.c Sun Dec 29 19:17:27 2002 -@@ -302,7 +302,7 @@ ++++ 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; - pos = gui_entry_get_pos(active_entry); - gui_entry_set_pos(active_entry, active_entry->text_len); -- gui_entry_erase(active_entry, active_entry->text_len - pos, TRUE); -+ gui_entry_erase_to(active_entry, pos, TRUE); - } ++static int big5high = FALSE; ++static unichar prekey = '\0'; ++ ++ + static int readtag; + static time_t idle_time; - static void key_yank_from_cutbuffer(void) +@@ -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+'@'; |