diff options
author | vanilla <vanilla@FreeBSD.org> | 2003-04-01 02:03:43 +0000 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2003-04-01 02:03:43 +0000 |
commit | 1cecb776884f167f76e0f177effa18940c9c2012 (patch) | |
tree | 96fbe927ad2245e392c6a2e219ebb912d568f0eb /chinese | |
parent | 069e1c24554d749c64230ae3399a37169426e350 (diff) | |
download | FreeBSD-ports-1cecb776884f167f76e0f177effa18940c9c2012.zip FreeBSD-ports-1cecb776884f167f76e0f177effa18940c9c2012.tar.gz |
Add a patch to fix readline routine problem.
PR: ports/50374
Submitted by: Michael Hsin <mhsin@mhsin.org>
Diffstat (limited to 'chinese')
-rw-r--r-- | chinese/irssi/Makefile | 2 | ||||
-rw-r--r-- | chinese/irssi/files/patch-src::fe-text::gui-readline.c | 45 |
2 files changed, 38 insertions, 9 deletions
diff --git a/chinese/irssi/Makefile b/chinese/irssi/Makefile index 002211f..59388c9 100644 --- a/chinese/irssi/Makefile +++ b/chinese/irssi/Makefile @@ -13,7 +13,7 @@ EXTRA_PATCHES= ${.CURDIR}/files/patch-irssi.conf \ ${.CURDIR}/files/patch-src::fe-text::textbuffer-view.c \ ${.CURDIR}/files/patch-src::fe-text::utf8.h -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= chinese MAINTAINER= vanilla@FreeBSD.org 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 2b7e026..5b514ef 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+'@'; |