# HG changeset patch # User Mikael Berthe # Date 1138467744 -3600 # Node ID 1f8987e0e56c8a0b84b7d6133efce377e09f96bb # Parent 5933a803667240aad38ab564c6879b6122633849 Try to display as many buddylist items as possible diff -r 5933a8036672 -r 1f8987e0e56c mcabber/src/screen.c --- a/mcabber/src/screen.c Sat Jan 28 17:40:00 2006 +0100 +++ b/mcabber/src/screen.c Sat Jan 28 18:02:24 2006 +0100 @@ -713,7 +713,7 @@ update_roster = FALSE; getmaxyx(rosterWnd, maxy, maxx); - maxx --; // last char is for vertical border + maxx--; // last char is for vertical border name[ROSTER_WIDTH-7] = 0; // cleanup of roster window @@ -732,6 +732,11 @@ } // Update offset if necessary + // a) Try to show as many buddylist items as possible + i = g_list_length(buddylist) - maxy; + if (0 <= i && i < offset) + offset = i; + // b) Make sure the current_buddy is visible i = g_list_position(buddylist, current_buddy); if (i == -1) { // This is bad scr_LogPrint(LPRINT_NORMAL, "Doh! Can't find current selected buddy!!");