mcabber/src/screen.c
changeset 1579 a2dd83167bc9
parent 1577 ece4f26bf9ff
child 1590 8d1bcc83ae32
--- a/mcabber/src/screen.c	Mon Apr 13 01:16:23 2009 +0200
+++ b/mcabber/src/screen.c	Mon Apr 13 22:48:48 2009 +0200
@@ -1959,7 +1959,10 @@
         foreach_group_member(BUDDATA(buddy), increment_if_buddy_not_filtered,
                              &group_count);
         snprintf(rline, 4*Roster_Width, " %c+++ %s (%i)", pending, name,
-               group_count);
+                 group_count);
+        /* Do not display the item count if there isn't enough space */
+        if (g_utf8_strlen(rline, 4*Roster_Width) >= Roster_Width)
+          snprintf(rline, 4*Roster_Width, " %c--- %s", pending, name);
       }
       else
         snprintf(rline, 4*Roster_Width, " %c--- %s", pending, name);