From 0f39c504d14af76afffc5c6e6e0193a1d4a749e9 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 15 Feb 2002 14:04:10 +0000 Subject: Statusbar wasn't always properly cleared when there was right-aligned items. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2449 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/statusbar.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/fe-text/statusbar.c b/src/fe-text/statusbar.c index a9271b3c..e875811a 100644 --- a/src/fe-text/statusbar.c +++ b/src/fe-text/statusbar.c @@ -231,8 +231,7 @@ static void statusbar_resize_items(STATUSBAR_REC *bar, int max_width) } #define SBAR_ITEM_REDRAW_NEEDED(_bar, _item, _xpos) \ - (((_bar)->dirty_xpos != -1 && \ - (_xpos) >= (_bar)->dirty_xpos) || \ + (((_bar)->dirty_xpos != -1 && (_xpos) >= (_bar)->dirty_xpos) || \ (_item)->xpos != (_xpos) || (_item)->current_size != (_item)->size) static void statusbar_calc_item_positions(STATUSBAR_REC *bar) @@ -279,7 +278,9 @@ static void statusbar_calc_item_positions(STATUSBAR_REC *bar) if (rec->config->right_alignment) { if (rec->size > 0) right_items = g_slist_prepend(right_items, rec); - else if (rec->current_size > 0) { + else if (rec->current_size > 0 && + (bar->dirty_xpos == -1 || + rec->xpos < bar->dirty_xpos)) { /* item was hidden - set the dirty position to begin from the item's old xpos */ irssi_set_dirty(); -- cgit v1.2.3