fix(grid): Clear sixels when clearing terminal (#3982)

* fix(grid): Clear sixels when clearing terminal

No code paths existed to clear sixel images when handling csi dispatch for
clear.

* fix(grid): Also clear sixels on lines above
This commit is contained in:
Flat 2025-02-24 08:57:47 -05:00 committed by GitHub
parent 332c3e514c
commit 03e26603c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2791,8 +2791,14 @@ impl Perform for Grid {
} else if clear_type == 2 { } else if clear_type == 2 {
self.set_scroll_region_to_viewport_size(); self.set_scroll_region_to_viewport_size();
self.fill_viewport(char_to_replace); self.fill_viewport(char_to_replace);
if let Some(images_to_reap) = self.sixel_grid.clear() {
self.sixel_grid.reap_images(images_to_reap);
}
} else if clear_type == 3 { } else if clear_type == 3 {
self.clear_lines_above(); self.clear_lines_above();
if let Some(images_to_reap) = self.sixel_grid.clear() {
self.sixel_grid.reap_images(images_to_reap);
}
} }
}; };
} else if c == 'H' || c == 'f' { } else if c == 'H' || c == 'f' {