From 99120dc50803c8537c50cabc9289179ae4b1d39d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 18 Nov 2001 22:15:56 +0000 Subject: [PATCH] back to "Irssi didn't always remove the statusbar item from screen when it should have." bug - this time with right-aligned items :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2065 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/statusbar.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/fe-text/statusbar.c b/src/fe-text/statusbar.c index c8c9c14d..986b153d 100644 --- a/src/fe-text/statusbar.c +++ b/src/fe-text/statusbar.c @@ -276,8 +276,17 @@ static void statusbar_calc_item_positions(STATUSBAR_REC *bar) for (tmp = bar->items; tmp != NULL; tmp = tmp->next) { SBAR_ITEM_REC *rec = tmp->data; - if (rec->config->right_alignment && rec->size > 0) - right_items = g_slist_prepend(right_items, rec); + if (rec->config->right_alignment) { + if (rec->size > 0) + right_items = g_slist_prepend(right_items, rec); + else if (rec->current_size > 0) { + /* item was hidden - set the dirty position + to begin from the item's old xpos */ + irssi_set_dirty(); + bar->dirty = TRUE; + bar->dirty_xpos = rec->xpos; + } + } } rxpos = term_width;