From 0ca5c7a6956d2af95f798b858e646e5ec8e63403 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Thu, 26 Jul 2018 20:47:33 +0000 Subject: 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. --- src/term/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/term/mod.rs b/src/term/mod.rs index 3cdd5ff3..ca3b5025 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -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(); -- cgit