comparison mcabber/src/screen.c @ 189:4f3975f1b852

[/trunk] Changeset 201 by mikael * Add hbuf_previous_persistent(). Now we should not jump to the buffer's bottom when increasing the screen width.
author mikael
date Fri, 06 May 2005 14:34:51 +0000
parents 4ce9ff808baa
children 9c2023d60986
comparison
equal deleted inserted replaced
188:7604e3cdbb86 189:4f3975f1b852
531 cols = maxX - ROSTER_WIDTH; 531 cols = maxX - ROSTER_WIDTH;
532 532
533 list_for_each_safe(pos, n, &window_list) { 533 list_for_each_safe(pos, n, &window_list) {
534 search_entry = window_entry(pos); 534 search_entry = window_entry(pos);
535 if (search_entry->win) { 535 if (search_entry->win) {
536 GList *rescue_top;
536 // Resize buddy window (no need to move it) 537 // Resize buddy window (no need to move it)
537 wresize(search_entry->win, lines, cols); 538 wresize(search_entry->win, lines, cols);
538 werase(search_entry->win); 539 werase(search_entry->win);
539 // If a panel exists, replace the old window with the new 540 // If a panel exists, replace the old window with the new
540 if (search_entry->panel) { 541 if (search_entry->panel) {
541 replace_panel(search_entry->panel, search_entry->win); 542 replace_panel(search_entry->panel, search_entry->win);
542 } 543 }
543 // Redo line wrapping 544 // Redo line wrapping
545 rescue_top = hbuf_previous_persistent(search_entry->top);
544 hbuf_rebuild(&search_entry->hbuf, 546 hbuf_rebuild(&search_entry->hbuf,
545 maxX - ROSTER_WIDTH - PREFIX_WIDTH); 547 maxX - ROSTER_WIDTH - PREFIX_WIDTH);
548 if (g_list_position(g_list_first(search_entry->hbuf), search_entry->top) == -1)
549 search_entry->top = rescue_top;
546 } 550 }
547 } 551 }
548 552
549 // Refresh current buddy window 553 // Refresh current buddy window
550 if (chatmode) 554 if (chatmode)