aboutsummaryrefslogtreecommitdiff
path: root/chinese/irssi
diff options
context:
space:
mode:
authorVanilla I. Shu <vanilla@FreeBSD.org>2002-01-28 09:10:52 +0000
committerVanilla I. Shu <vanilla@FreeBSD.org>2002-01-28 09:10:52 +0000
commit3f8731a4f29d0858346cab56fb3ccb94da42c5f8 (patch)
tree8ec77173bc81a5d2dec7ae90fd3a5b8f7cd88e95 /chinese/irssi
parentd2f8d37ae46f046dd1c3cb517ba1499323064665 (diff)
downloadports-3f8731a4f29d0858346cab56fb3ccb94da42c5f8.tar.gz
ports-3f8731a4f29d0858346cab56fb3ccb94da42c5f8.zip
Notes
Diffstat (limited to 'chinese/irssi')
-rw-r--r--chinese/irssi/Makefile2
-rw-r--r--chinese/irssi/files/patch-src_fe-text_gui-entry.c39
2 files changed, 29 insertions, 12 deletions
diff --git a/chinese/irssi/Makefile b/chinese/irssi/Makefile
index 901c9057e83d..dd758a858581 100644
--- a/chinese/irssi/Makefile
+++ b/chinese/irssi/Makefile
@@ -12,7 +12,7 @@ EXTRA_PATCHES= ${.CURDIR}/files/patch-config.h.in \
${.CURDIR}/files/patch-src_fe-text_screen.h \
${.CURDIR}/files/patch-src_fe-text_window.c
-PORTREVISION= 2
+PORTREVISION= 3
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 1b349680a57e..a621af8e6e6b 100644
--- a/chinese/irssi/files/patch-src_fe-text_gui-entry.c
+++ b/chinese/irssi/files/patch-src_fe-text_gui-entry.c
@@ -1,10 +1,12 @@
--- src/fe-text/gui-entry.c.orig Sun Mar 4 02:04:10 2001
-+++ src/fe-text/gui-entry.c Mon Nov 5 01:40:11 2001
-@@ -29,6 +29,26 @@
++++ src/fe-text/gui-entry.c Sat Jan 26 20:38:19 2002
+@@ -29,6 +29,28 @@
static int prompt_hidden;
static char *prompt;
+#ifdef WANT_BIG5
++#include "settings.h"
++
+int gui_is_big5(char *str, int pos)
+{
+ int a;
@@ -27,7 +29,7 @@
static void entry_screenpos(void)
{
if (pos-scrstart < COLS-2-promptlen && pos-scrstart > 0) {
-@@ -42,6 +62,14 @@
+@@ -42,6 +64,14 @@
} else {
scrpos = (COLS-promptlen)*2/3;
scrstart = pos-scrpos;
@@ -42,29 +44,44 @@
}
}
-@@ -152,6 +180,11 @@
+@@ -152,6 +182,12 @@
{
if (pos < size) return;
+#ifdef WANT_BIG5
-+ if (gui_is_big5(entry->str, pos - 2))
-+ size++;
++ if (settings_get_bool("big5_cursor_movement"))
++ if(size == 1 && gui_is_big5(entry->str, pos - 2))
++ size++;
+#endif WANT_BIG5
+
pos -= size;
g_string_erase(entry, pos, size);
-@@ -217,6 +250,13 @@
+@@ -217,6 +253,16 @@
void gui_entry_move_pos(int p)
{
+#ifdef WANT_BIG5
-+ if (p > 0 && gui_is_big5(entry->str, pos))
-+ p++;
-+ else if (p < 0 && gui_is_big5(entry->str, pos - 2))
-+ p--;
++ if(settings_get_bool("big5_cursor_movement"))
++ {
++ if (p == 1 && gui_is_big5(entry->str, pos))
++ p++;
++ else if (p == -1 && gui_is_big5(entry->str, pos - 2))
++ p--;
++ }
+#endif WANT_BIG5
+
if (pos+p >= 0 && pos+p <= entry->len)
pos += p;
+@@ -277,6 +323,9 @@
+ prompt = NULL; promptlen = 0;
+ permanent_prompt = FALSE;
+ prompt_hidden = FALSE;
++#ifdef WANT_BIG5
++ settings_add_bool("fe-text", "big5_cursor_movement", FALSE);
++#endif WANT_BIG5
+ }
+
+ void gui_entry_deinit(void)
+