From 02846f4c8273b3be184a0aa507f9b0637caa45a3 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 19 Feb 2018 10:51:34 -0800 Subject: [PATCH] use Cell::reset to clear portions of a line --- term/src/screen.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/term/src/screen.rs b/term/src/screen.rs index 8d369cda3..f92426e37 100644 --- a/term/src/screen.rs +++ b/term/src/screen.rs @@ -126,7 +126,6 @@ impl Screen { } pub fn clear_line(&mut self, y: VisibleRowIndex, cols: std::ops::Range) { - let blank = Cell::default(); let line_idx = self.phys_row(y); let line = self.line_mut(line_idx); let max_col = line.cells.len(); @@ -134,7 +133,7 @@ impl Screen { if x >= max_col { break; } - line.cells[x] = blank.clone(); + line.cells[x].reset(); } }