diff options
author | Vanilla I. Shu <vanilla@FreeBSD.org> | 2003-04-01 02:03:43 +0000 |
---|---|---|
committer | Vanilla I. Shu <vanilla@FreeBSD.org> | 2003-04-01 02:03:43 +0000 |
commit | 17994e305b7db88ba07bfc6347ae464a3e0e36de (patch) | |
tree | 8de1cce3268431b80a7e6d1999d7c35514b298f9 /chinese/irssi | |
parent | ada2c72a1253d23fb9adf561cbd09dd5be94377d (diff) | |
download | ports-17994e305b7db88ba07bfc6347ae464a3e0e36de.tar.gz ports-17994e305b7db88ba07bfc6347ae464a3e0e36de.zip |
Add a patch to fix readline routine problem.
PR: ports/50374
Submitted by: Michael Hsin <mhsin@mhsin.org>
Notes
Notes:
svn path=/head/; revision=77882
Diffstat (limited to 'chinese/irssi')
-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 002211f6f0d4..59388c9687df 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 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+'@'; |