Mercurial > hg
changeset 1579:a2dd83167bc9
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.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 13 Apr 2009 22:48:48 +0200 |
parents | 5bb4b580f229 |
children | c8be6c2243d6 |
files | mcabber/src/screen.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);