# HG changeset patch # User Mikael Berthe # Date 1146751342 -7200 # Node ID 63707a595c2ee9c11657494b5188c94e9771f55b # Parent 7c210263c661495f0961ac94eeece4795ff09344 Fix a display bug when resizing the buffer window The g_list_position() trick was stupid, it cannot work because all the non-persistent lines are removed anyway. Let's always use the "previous persistent" line. diff -r 7c210263c661 -r 63707a595c2e mcabber/src/screen.c --- a/mcabber/src/screen.c Thu May 04 10:44:55 2006 +0200 +++ b/mcabber/src/screen.c Thu May 04 16:02:22 2006 +0200 @@ -810,7 +810,6 @@ for (wblp = winbuflst; wblp; wblp = g_slist_next(wblp)) { wbp = wblp->data; if (wbp->win) { - GList *rescue_top; // Resize/move buddy window wresize(wbp->win, lines, cols); mvwin(wbp->win, 0, Roster_Width); @@ -819,11 +818,8 @@ if (wbp->panel) replace_panel(wbp->panel, wbp->win); // Redo line wrapping - rescue_top = hbuf_previous_persistent(wbp->top); + wbp->top = hbuf_previous_persistent(wbp->top); hbuf_rebuild(&wbp->hbuf, maxX - Roster_Width - PREFIX_WIDTH); - if (g_list_position(g_list_first(wbp->hbuf), wbp->top) == -1) { - wbp->top = rescue_top; - } } }