termwiz: lineedit: replace a println with render/flush

The terminal may not be attached to stdout, so the println isn't
appropriate.
This commit is contained in:
Wez Furlong committed 2020-01-20 07:55:51 -08:00
1 parent d644a78699
commit 7aa0994b0f
1 file changed
+2 -1
+2 -1
View File
@@ -186,7 +186,8 @@ impl<T: Terminal> LineEditor<T> {
self.terminal.set_raw_mode()?;
let res = self.read_line_impl(host);
self.terminal.set_cooked_mode()?;
println!();
self.terminal.render(&[Change::Text("\r\n".to_string())])?;
self.terminal.flush()?;
res
}