# HG changeset patch # User Mikael Berthe # Date 1239655728 -7200 # Node ID a2dd83167bc90f46136e5c5ee740598e0f809821 # Parent 5bb4b580f22904ef65c51f16bf0f334f2d5065da Fix display error in the roster When displaying the group item counts in the roster, the number could wrap -- and overwrite the vertical line. Issue reported by "Dennis" in the MUC room. diff -r 5bb4b580f229 -r a2dd83167bc9 mcabber/src/screen.c --- 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);