fix(compatibility): scroll lines into scrollback when clearing screen (#747)
* fix(compatibility): scroll lines into scrollback when clearing screen * fix(tests): silently fail on channel close error
This commit is contained in:
parent
865209c18b
commit
fb8e44b8a8
2 changed files with 8 additions and 2 deletions
|
|
@ -496,6 +496,6 @@ impl RemoteRunner {
|
||||||
|
|
||||||
impl Drop for RemoteRunner {
|
impl Drop for RemoteRunner {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
self.channel.close().unwrap();
|
let _ = self.channel.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -843,7 +843,13 @@ impl Grid {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn fill_viewport(&mut self, character: TerminalCharacter) {
|
pub fn fill_viewport(&mut self, character: TerminalCharacter) {
|
||||||
self.viewport.clear();
|
let row_count_to_transfer = self.viewport.len();
|
||||||
|
transfer_rows_from_viewport_to_lines_above(
|
||||||
|
&mut self.viewport,
|
||||||
|
&mut self.lines_above,
|
||||||
|
row_count_to_transfer,
|
||||||
|
self.width,
|
||||||
|
);
|
||||||
for _ in 0..self.height {
|
for _ in 0..self.height {
|
||||||
let columns = vec![character; self.width];
|
let columns = vec![character; self.width];
|
||||||
self.viewport.push(Row::from_columns(columns).canonical());
|
self.viewport.push(Row::from_columns(columns).canonical());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue