comparison mcabber/src/screen.c @ 109:96d239239c7a

[/trunk] Changeset 123 by mikael * Fix scrolling after /clear.
author mikael
date Sat, 23 Apr 2005 18:10:27 +0000
parents 7fb72bc13732
children 33bff2c57293
comparison
equal deleted inserted replaced
108:7fb72bc13732 109:96d239239c7a
629 // Scroll up half a screen (or less) 629 // Scroll up half a screen (or less)
630 nblines = CHAT_WIN_HEIGHT/2-1; 630 nblines = CHAT_WIN_HEIGHT/2-1;
631 hbuf_top = win_entry->top; 631 hbuf_top = win_entry->top;
632 if (!hbuf_top) { 632 if (!hbuf_top) {
633 hbuf_top = g_list_last(win_entry->hbuf); 633 hbuf_top = g_list_last(win_entry->hbuf);
634 nblines *= 3; 634 if (!win_entry->cleared)
635 nblines *= 3;
636 else
637 win_entry->cleared = FALSE;
635 } 638 }
636 639
637 n = 0; 640 n = 0;
638 while (hbuf_top && n < nblines && g_list_previous(hbuf_top)) { 641 while (hbuf_top && n < nblines && g_list_previous(hbuf_top)) {
639 hbuf_top = g_list_previous(hbuf_top); 642 hbuf_top = g_list_previous(hbuf_top);
701 win_entry = scr_SearchWindow(jid); 704 win_entry = scr_SearchWindow(jid);
702 if (!win_entry) 705 if (!win_entry)
703 return; 706 return;
704 707
705 win_entry->cleared = TRUE; 708 win_entry->cleared = TRUE;
709 win_entry->top = NULL;
706 710
707 // Refresh the window 711 // Refresh the window
708 scr_UpdateWindow(win_entry); 712 scr_UpdateWindow(win_entry);
709 713
710 // Finished :) 714 // Finished :)