From 23777171f231163455007ff11fa57b5dcde6ac5c Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Mon, 9 Nov 2020 19:45:09 +0200 Subject: [PATCH] listing: clear_area in draw_menu Completely clear area in draw_menu instead of resetting ch, fg, bg etc. --- src/components/mail/listing.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/components/mail/listing.rs b/src/components/mail/listing.rs index cebe022e..39756bea 100644 --- a/src/components/mail/listing.rs +++ b/src/components/mail/listing.rs @@ -1457,15 +1457,7 @@ impl Listing { if !self.is_dirty() { return; } - for row in grid.bounds_iter(area) { - for c in row { - grid[c] - .set_ch(' ') - .set_fg(self.theme_default.fg) - .set_bg(self.theme_default.bg) - .set_attrs(self.theme_default.attrs); - } - } + clear_area(grid, area, self.theme_default); /* visually divide menu and listing */ area = (area.0, pos_dec(area.1, (1, 0))); let upper_left = upper_left!(area);