aboutsummaryrefslogtreecommitdiff
path: root/irc
diff options
context:
space:
mode:
authorVanilla I. Shu <vanilla@FreeBSD.org>2006-09-25 08:29:18 +0000
committerVanilla I. Shu <vanilla@FreeBSD.org>2006-09-25 08:29:18 +0000
commit0488197b6abf1d5f23793fc68f60051ed95eba0a (patch)
tree3d19dd7ec06a03a510a477384d4fd37cfad1e472 /irc
parent42ae81dcca6caf37bf5b8ff63f36990ed9a1c2b9 (diff)
downloadports-0488197b6abf1d5f23793fc68f60051ed95eba0a.tar.gz
ports-0488197b6abf1d5f23793fc68f60051ed95eba0a.zip
When irssi displays a overlong topic with wide (width > 1) character on the
display margin, it will truncate AFTER that character. That is, the whole wide character is outputted and mess up the screen. This patch fixes the problem by truncating BEFORE wide characters that fall on the display margin. PR: ports/103597 Submitted by: Yi-Hsuan Hsin <mhsin_at_mhsin_dot_org>
Notes
Notes: svn path=/head/; revision=173780
Diffstat (limited to 'irc')
-rw-r--r--irc/irssi/Makefile2
-rw-r--r--irc/irssi/files/patch-topic_length41
2 files changed, 42 insertions, 1 deletions
diff --git a/irc/irssi/Makefile b/irc/irssi/Makefile
index 5f19320e4efd..9401141e9f44 100644
--- a/irc/irssi/Makefile
+++ b/irc/irssi/Makefile
@@ -7,7 +7,7 @@
PORTNAME= irssi
PORTVERSION= 0.8.10
-PORTREVISION?= 2
+PORTREVISION?= 3
CATEGORIES?= irc
MASTER_SITES= http://mirror.irssi.org/
diff --git a/irc/irssi/files/patch-topic_length b/irc/irssi/files/patch-topic_length
new file mode 100644
index 000000000000..22d37855dfae
--- /dev/null
+++ b/irc/irssi/files/patch-topic_length
@@ -0,0 +1,41 @@
+--- src/fe-common/core/formats.c.orig Fri Dec 9 01:32:44 2005
++++ src/fe-common/core/formats.c Mon Sep 25 06:15:26 2006
+@@ -376,6 +376,7 @@
+ GString *tmp;
+ const char *start;
+ #ifdef HAVE_GLIB2
++ const char *oldstr;
+ gboolean utf8;
+ #endif
+ g_return_val_if_fail(str != NULL, 0);
+@@ -404,7 +405,10 @@
+ }
+
+ #ifdef HAVE_GLIB2
++ oldstr = str;
+ len -= advance(&str, utf8);
++ if(len < 0)
++ str = oldstr;
+ #else
+ len--;
+ str++;
+--- src/fe-text/statusbar.c.orig Fri Dec 9 01:32:46 2005
++++ src/fe-text/statusbar.c Mon Sep 25 10:15:25 2006
+@@ -732,7 +732,8 @@
+ /* they're forcing us smaller than minimum size.. */
+ len = format_real_length(tmpstr, item->size);
+ tmpstr[len] = '\0';
+- } else {
++ }
++
+ /* make sure the str is big enough to fill the
+ requested size, so it won't corrupt screen */
+ len = format_get_length(tmpstr);
+@@ -747,7 +748,6 @@
+ g_free(fill);
+ g_free(tmpstr);
+ tmpstr = tmpstr2;
+- }
+ }
+
+ tmpstr2 = update_statusbar_bg(tmpstr, item->bar->color);