Mercurial > pidgin.yaz
changeset 21273:6e666ae6f68e
Do not ellipsize in a column of size 1.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 30 Oct 2007 09:55:47 +0000 |
parents | f869796bf505 |
children | b3c6d817d68d |
files | finch/libgnt/gnttree.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/libgnt/gnttree.c Tue Oct 30 09:32:10 2007 +0000 +++ b/finch/libgnt/gnttree.c Tue Oct 30 09:55:47 2007 +0000 @@ -363,7 +363,7 @@ notfirst = TRUE; if (len > width) { - len = width - 1; + len = MAX(1, width - 1); cut = TRUE; } @@ -373,7 +373,7 @@ 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