Commit 0ca5c7a6 authored by Christian Duerr's avatar Christian Duerr Committed by GitHub

Fix trailing colors when leaving vim after resize

There is an issue where the terminal would use the template cell to fill
new space after resizing the terminal. However this leads to issues
since the template cell is not always empty and thus can create some
blocks of color appearing out of nowhere.

This should fix this problem by always initializing cells with the
default cell after resizing.
parent b59fd21c
......@@ -1138,8 +1138,8 @@ impl Term {
debug!("num_cols, num_lines = {}, {}", num_cols, num_lines);
// Resize grids to new size
self.grid.resize(num_lines, num_cols, &self.cursor.template);
self.alt_grid.resize(num_lines, num_cols, &self.cursor_save_alt.template);
self.grid.resize(num_lines, num_cols, &Cell::default());
self.alt_grid.resize(num_lines, num_cols, &Cell::default());
// Reset scrolling region to new size
self.scroll_region = Line(0)..self.grid.num_lines();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment