diff --git a/chinese/irssi/Makefile b/chinese/irssi/Makefile index d7a0cc15c4b2..4f34437aefdf 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= 1 +PORTREVISION= 2 CATEGORIES= chinese MAINTAINER= vanilla@FreeBSD.org diff --git a/chinese/irssi/files/patch-src::fe-text::gui-entry.c b/chinese/irssi/files/patch-src::fe-text::gui-entry.c index 246cf32f46e5..e40b933da3b8 100644 --- a/chinese/irssi/files/patch-src::fe-text::gui-entry.c +++ b/chinese/irssi/files/patch-src::fe-text::gui-entry.c @@ -1,5 +1,5 @@ --- src/fe-text/gui-entry.c.orig Tue Oct 15 02:45:08 2002 -+++ src/fe-text/gui-entry.c Sat Nov 23 17:28:31 2002 ++++ src/fe-text/gui-entry.c Sun Dec 29 19:18:05 2002 @@ -68,6 +68,27 @@ g_free(entry); } @@ -64,8 +64,20 @@ { unichar chr; int i, len; -@@ -343,11 +366,18 @@ +@@ -341,13 +364,30 @@ + return buf; + } ++void gui_entry_erase_to(GUI_ENTRY_REC *entry, int pos, int update_cutbuffer) ++{ ++ int newpos, size = 0; ++ ++ g_return_if_fail(entry != NULL); ++ for(newpos = gui_entry_get_pos(entry); newpos > pos; size ++) ++ newpos = _fix_big5_pos(entry->text, newpos - 1, -1); ++ gui_entry_erase(entry, size, update_cutbuffer); ++} ++ void gui_entry_erase(GUI_ENTRY_REC *entry, int size, int update_cutbuffer) { + int newpos; @@ -76,14 +88,14 @@ return; + /* recount the erase size with big5 charsets */ -+ for (newpos = entry->pos; newpos >= 0 && size > 0; size--) ++ for (newpos = entry->pos; newpos > 0 && size > 0; size--) + newpos = _fix_big5_pos(entry->text, newpos-1, -1); + size = entry->pos - newpos; + if (update_cutbuffer) { /* put erased text to cutbuffer */ if (entry->cutbuffer == NULL || entry->cutbuffer_len < size) { -@@ -471,10 +501,24 @@ +@@ -471,10 +511,24 @@ void gui_entry_move_pos(GUI_ENTRY_REC *entry, int pos) { diff --git a/chinese/irssi/files/patch-src::fe-text::gui-entry.h b/chinese/irssi/files/patch-src::fe-text::gui-entry.h index 2a3fe9476661..4b1a295835b4 100644 --- a/chinese/irssi/files/patch-src::fe-text::gui-entry.h +++ b/chinese/irssi/files/patch-src::fe-text::gui-entry.h @@ -1,6 +1,6 @@ --- src/fe-text/gui-entry.h.orig Wed Feb 20 20:46:45 2002 -+++ src/fe-text/gui-entry.h Sat Nov 23 17:28:32 2002 -@@ -28,14 +28,14 @@ ++++ src/fe-text/gui-entry.h Sun Dec 29 19:19:26 2002 +@@ -28,17 +28,18 @@ void gui_entry_move(GUI_ENTRY_REC *entry, int xpos, int ypos, int width); void gui_entry_set_active(GUI_ENTRY_REC *entry); @@ -18,3 +18,7 @@ void gui_entry_insert_char(GUI_ENTRY_REC *entry, unichar chr); char *gui_entry_get_cutbuffer(GUI_ENTRY_REC *entry); ++void gui_entry_erase_to(GUI_ENTRY_REC *entry, int pos, int update_cutbuffer); + void gui_entry_erase(GUI_ENTRY_REC *entry, int size, int update_cutbuffer); + void gui_entry_erase_word(GUI_ENTRY_REC *entry, int to_space); + void gui_entry_erase_next_word(GUI_ENTRY_REC *entry, int to_space); diff --git a/chinese/irssi/files/patch-src::fe-text::gui-readline.c b/chinese/irssi/files/patch-src::fe-text::gui-readline.c new file mode 100644 index 000000000000..2b7e026bc7a7 --- /dev/null +++ b/chinese/irssi/files/patch-src::fe-text::gui-readline.c @@ -0,0 +1,11 @@ +--- 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 @@ + + 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 void key_yank_from_cutbuffer(void)