From eda7fc70a808a4cb32b039795373173ba4ea0c54 Mon Sep 17 00:00:00 2001 From: "Vanilla I. Shu" Date: Sat, 17 Nov 2001 04:29:08 +0000 Subject: Add another patch for BIG5 cursor movement, and bump version. Submitted by: mhsin@mhsin.org --- chinese/irssi/Makefile | 1 + chinese/irssi/files/patch-src_fe-text_gui-entry.c | 30 ++++++++++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-) (limited to 'chinese/irssi') diff --git a/chinese/irssi/Makefile b/chinese/irssi/Makefile index 47c2faab6556..58fe5bab2417 100644 --- a/chinese/irssi/Makefile +++ b/chinese/irssi/Makefile @@ -12,6 +12,7 @@ EXTRA_PATCHES= ${.CURDIR}/files/patch-config.h.in \ ${.CURDIR}/files/patch-src_fe-text_screen.h \ ${.CURDIR}/files/patch-src_fe-text_wrap.c +PORTREVISION= 1 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 d12b49a489fc..1b349680a57e 100644 --- a/chinese/irssi/files/patch-src_fe-text_gui-entry.c +++ b/chinese/irssi/files/patch-src_fe-text_gui-entry.c @@ -1,8 +1,8 @@ --- src/fe-text/gui-entry.c.orig Sun Mar 4 02:04:10 2001 -+++ src/fe-text/gui-entry.c Thu Nov 1 23:38:28 2001 -@@ -148,10 +148,35 @@ - entry_update(); - } ++++ src/fe-text/gui-entry.c Mon Nov 5 01:40:11 2001 +@@ -29,6 +29,26 @@ + static int prompt_hidden; + static char *prompt; +#ifdef WANT_BIG5 +int gui_is_big5(char *str, int pos) @@ -24,7 +24,25 @@ +} +#endif WANT_BIG5 + - void gui_entry_erase(int size) + static void entry_screenpos(void) + { + if (pos-scrstart < COLS-2-promptlen && pos-scrstart > 0) { +@@ -42,6 +62,14 @@ + } else { + scrpos = (COLS-promptlen)*2/3; + scrstart = pos-scrpos; ++#ifdef WANT_BIG5 ++ if((scrstart > 0) && ++ gui_is_big5(entry->str, scrstart - 1)) ++ { ++ scrstart --; ++ scrpos ++; ++ } ++#endif WANT_BIG5 + } + } + +@@ -152,6 +180,11 @@ { if (pos < size) return; @@ -36,7 +54,7 @@ pos -= size; g_string_erase(entry, pos, size); -@@ -217,6 +242,13 @@ +@@ -217,6 +250,13 @@ void gui_entry_move_pos(int p) { -- cgit v1.2.3