# HG changeset patch # User Sadrul Habib Chowdhury # Date 1193738147 0 # Node ID 6e666ae6f68e45c62ce6c3796e8a8c1109e1fa89 # Parent f869796bf505f29ef74a34ec91eaa5132be7aea2 Do not ellipsize in a column of size 1. diff -r f869796bf505 -r 6e666ae6f68e finch/libgnt/gnttree.c --- 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