fix(compatibility): handle csi erase param 3 (#1026)

This commit is contained in:
Thomas Linford 2022-01-26 18:50:29 +01:00 committed by GitHub
parent f851cc1861
commit cf22e1f50e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1145,6 +1145,11 @@ impl Grid {
}
self.output_buffer.update_all_lines();
}
fn clear_lines_above(&mut self) {
self.lines_above.clear();
self.scrollback_buffer_lines = self.recalculate_scrollback_buffer_count();
}
fn pad_current_line_until(&mut self, position: usize) {
let current_row = self.viewport.get_mut(self.cursor.y).unwrap();
for _ in current_row.len()..position {
@ -1765,6 +1770,8 @@ impl Perform for Grid {
self.clear_all_before_cursor(char_to_replace);
} else if clear_type == 2 {
self.fill_viewport(char_to_replace);
} else if clear_type == 3 {
self.clear_lines_above();
}
};
} else if c == 'H' || c == 'f' {