qulogic/libgnt
Clone
Summary
Browse
Changes
Graph
Do not ellipsize in a column of size 1.
next.minor
2007-10-30, Sadrul Habib Chowdhury
187ebb88a660
Parents
935d3321f12d
Children
147c18c97129
Do not ellipsize in a column of size 1.
1 files changed, 2 insertions(+), 2 deletions(-)
+2
-2
gnttree.c
--- a/gnttree.c Tue Oct 30 09:32:10 2007 +0000
+++ b/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