Bug 103597

Summary: [PATCH] irc/irssi: Fixes overlong topic issue.
Product: Ports & Packages Reporter: Yi-Hsuan Hsin <mhsin>
Component: Individual Port(s)Assignee: Vanilla I. Shu <vanilla>
Status: Closed FIXED    
Severity: Affects Only Me CC: vanilla
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
irssi-0.8.10_3.patch none

Description Yi-Hsuan Hsin 2006-09-25 00:00:36 UTC
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.

Added file(s):
- files/patch-topic_length

Port maintainer (vanilla@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-09-25 00:00:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->vanilla

Over to maintainer
Comment 2 Yi-Hsuan Hsin 2006-09-25 03:33:48 UTC
Sorry, this is the correct patch.


diff -ruN --exclude=CVS /usr/ports/irc/irssi.orig/Makefile /usr/ports/irc/irssi/Makefile
--- /usr/ports/irc/irssi.orig/Makefile	Tue Sep 19 00:26:04 2006
+++ /usr/ports/irc/irssi/Makefile	Mon Sep 25 06:38:50 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	irssi
 PORTVERSION=	0.8.10
-PORTREVISION?=	2
+PORTREVISION?=	3
 CATEGORIES?=	irc
 MASTER_SITES=	http://mirror.irssi.org/
 
diff -ruN --exclude=CVS /usr/ports/irc/irssi.orig/files/patch-topic_length /usr/ports/irc/irssi/files/patch-topic_length
--- /usr/ports/irc/irssi.orig/files/patch-topic_length	Thu Jan  1 08:00:00 1970
+++ /usr/ports/irc/irssi/files/patch-topic_length	Mon Sep 25 10:16:27 2006
@@ -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);
Comment 3 dfilter service freebsd_committer freebsd_triage 2006-09-25 09:29:24 UTC
vanilla     2006-09-25 08:29:19 UTC

  FreeBSD ports repository

  Modified files:
    irc/irssi            Makefile 
  Added files:
    irc/irssi/files      patch-topic_length 
  Log:
  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>
  
  Revision  Changes    Path
  1.93      +1 -1      ports/irc/irssi/Makefile
  1.1       +41 -0     ports/irc/irssi/files/patch-topic_length (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Vanilla I. Shu freebsd_committer freebsd_triage 2006-09-25 09:29:40 UTC
State Changed
From-To: open->closed

Committed, thanks.