listing: clear_area in draw_menu

Completely clear area in draw_menu instead of resetting ch, fg, bg etc.
This commit is contained in:
Manos Pitsidianakis 2020-11-09 19:45:09 +02:00
parent cbaf21764c
commit 23777171f2
No known key found for this signature in database
GPG Key ID: 73627C2F690DF710

View File

@ -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);