Small fix in scr_DrawRoster()
authorMikael Berthe <mikael@lilotux.net>
Sun, 29 Jan 2006 22:57:35 +0100
changeset 682 f3945593432e
parent 681 8dc602a246a4
child 683 c5e0d8c3f00c
Small fix in scr_DrawRoster() Improve changeset 1f8987e0e56c, sometimes the offset was not set to the best value.
mcabber/src/screen.c
--- a/mcabber/src/screen.c	Sun Jan 29 12:00:04 2006 +0100
+++ b/mcabber/src/screen.c	Sun Jan 29 22:57:35 2006 +0100
@@ -734,7 +734,9 @@
   // 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)
+  if (i < 0)
+    i = 0;
+  if (i < offset)
     offset = i;
   // b) Make sure the current_buddy is visible
   i = g_list_position(buddylist, current_buddy);