changeset 512:1744664332cd

Fix "/buffer up"
author Mikael Berthe <mikael@lilotux.net>
date Sun, 13 Nov 2005 17:03:59 +0100
parents c7cdb9c6d7aa
children d40c434fff46
files mcabber/src/screen.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/screen.c	Sat Nov 12 17:49:29 2005 +0100
+++ b/mcabber/src/screen.c	Sun Nov 13 17:03:59 2005 +0100
@@ -1001,7 +1001,7 @@
 
   if (!nblines) {
     // Scroll half a screen (or less)
-    nbl = CHAT_WIN_HEIGHT/2-1;
+    nbl = CHAT_WIN_HEIGHT/2;
   } else {
     nbl = nblines;
   }
@@ -1010,10 +1010,12 @@
   if (updown == -1) {   // UP
     if (!hbuf_top) {
       hbuf_top = g_list_last(win_entry->hbuf);
-      if (!nblines && !win_entry->cleared)
-        nbl *= 3;
-      else
+      if (!win_entry->cleared) {
+        if (!nblines) nbl = nbl*3 - 1;
+        else nbl += CHAT_WIN_HEIGHT - 1;
+      } else {
         win_entry->cleared = FALSE;
+      }
     }
     for (n=0 ; hbuf_top && n < nbl && g_list_previous(hbuf_top) ; n++)
       hbuf_top = g_list_previous(hbuf_top);