diff options
author | Timo Sirainen <cras@irssi.org> | 2002-02-15 14:04:10 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-02-15 14:04:10 +0000 |
commit | 0f39c504d14af76afffc5c6e6e0193a1d4a749e9 (patch) | |
tree | 449574f4d702da678b64afa42236266b733476c3 | |
parent | afeb6fcb7d94157808a9290226adbadd42a824ec (diff) | |
download | irssi-0f39c504d14af76afffc5c6e6e0193a1d4a749e9.zip |
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
-rw-r--r-- | src/fe-text/statusbar.c | 7 |
1 files changed, 4 insertions, 3 deletions
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(); |