im.pidgin.pidgin.next.minor: f0cdd16c20f9773e28cd79b36ffcf1c66057e32e

sadrul at pidgin.im sadrul at pidgin.im
Tue Oct 30 05:50:39 EDT 2007


-----------------------------------------------------------------
Revision: f0cdd16c20f9773e28cd79b36ffcf1c66057e32e
Ancestor: 82a5da76ed44286e74a5b85f5d89b168542946ae
Author: sadrul at pidgin.im
Date: 2007-10-30T09:55:47
Branch: im.pidgin.pidgin.next.minor

Modified files:
        finch/libgnt/gnttree.c

ChangeLog: 

Do not ellipsize in a column of size 1.

-------------- next part --------------
============================================================
--- finch/libgnt/gnttree.c	3789bdf1e37a9ee25d1ddb2dc16f97e7e7769575
+++ finch/libgnt/gnttree.c	3f5cc11303eefc2986bf7396e6b10e458abdbf1f
@@ -363,7 +363,7 @@ update_row_text(GntTree *tree, GntTreeRo
 		notfirst = TRUE;
 
 		if (len > width) {
-			len = width - 1;
+			len = MAX(1, width - 1);
 			cut = TRUE;
 		}
 
@@ -373,7 +373,7 @@ update_row_text(GntTree *tree, GntTreeRo
 
 		text = gnt_util_onscreen_width_to_pointer(display, len - fl, NULL);
 		string = g_string_append_len(string, display, text - display);
-		if (cut) { /* ellipsis */
+		if (cut && width > 1) { /* ellipsis */
 			if (gnt_ascii_only())
 				g_string_append_c(string, '~');
 			else


More information about the Commits mailing list