mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-12 07:27:57 +00:00
Add a patch to fix crashing problem
PR: ports/46609 Submitted by: Michael Hsin <mhsin@mhsin.org>
This commit is contained in:
parent
bc95d13e1c
commit
66a703c5bb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=72167
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
11
chinese/irssi/files/patch-src::fe-text::gui-readline.c
Normal file
11
chinese/irssi/files/patch-src::fe-text::gui-readline.c
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user