From cbc1462bb4e47b37abb7201d2403eb9f0c695357 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Fri, 22 Mar 2019 21:45:51 -0700 Subject: [PATCH] fix color of erased characters This was responsible for eg: dialog rendering a black (or whatever the default background color was) strip behind the text in an invocation like: `dialog --yesno hello 0 0` Rather than render a default cell, render a blank cell using the current pen. --- term/src/terminalstate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/term/src/terminalstate.rs b/term/src/terminalstate.rs index 9011cc1b9..86b31eced 100644 --- a/term/src/terminalstate.rs +++ b/term/src/terminalstate.rs @@ -1582,8 +1582,8 @@ impl TerminalState { let x = self.cursor.x; let limit = (x + n as usize).min(self.screen().physical_cols); { + let blank = Cell::new(' ', self.pen.clone_sgr_only()); let screen = self.screen_mut(); - let blank = Cell::default(); for x in x..limit as usize { screen.set_cell(x, y, &blank); }