From ff4c1d05deee2b4b4d85c29a627fb01e60886c7f Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Sun, 9 May 2021 18:13:50 +0900 Subject: Replace the Clear widget with buffer.clear/clear_with. --- helix-term/src/ui/picker.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'helix-term/src/ui/picker.rs') diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index 6d77bf1d..55975240 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -205,14 +205,7 @@ impl Component for Picker { // clear area let background = cx.editor.theme.get("ui.background"); - for y in area.top()..area.bottom() { - for x in area.left()..area.right() { - let cell = surface.get_mut(x, y); - cell.reset(); - // cell.symbol.clear(); - cell.set_style(background); - } - } + surface.clear_with(area, background); use tui::widgets::Widget; // don't like this but the lifetime sucks -- cgit v1.2.3-70-g09d2