aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2018-07-26 20:47:33 +0000
committerGitHub <noreply@github.com>2018-07-26 20:47:33 +0000
commit0ca5c7a6956d2af95f798b858e646e5ec8e63403 (patch)
treeaaecbf581a43bff6feabd3cf8222ab48d9c0ae1f
parentb59fd21cac5f84c02e2df161bad708e440834320 (diff)
downloadalacritty-0ca5c7a6956d2af95f798b858e646e5ec8e63403.tar.gz
alacritty-0ca5c7a6956d2af95f798b858e646e5ec8e63403.zip
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.
-rw-r--r--src/term/mod.rs4
1 files changed, 2 insertions, 2 deletions
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();