summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/grid/row.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/grid/row.rs')
-rw-r--r--alacritty_terminal/src/grid/row.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/alacritty_terminal/src/grid/row.rs b/alacritty_terminal/src/grid/row.rs
index 058583f2..daee4408 100644
--- a/alacritty_terminal/src/grid/row.rs
+++ b/alacritty_terminal/src/grid/row.rs
@@ -90,12 +90,15 @@ impl<T: Copy> Row<T> {
where
T: GridCell,
{
- for item in &mut self.inner[..self.occ] {
- *item = *template;
- }
-
if template.is_empty() {
+ for item in &mut self.inner[..self.occ] {
+ *item = *template;
+ }
self.occ = 0;
+ } else {
+ let len = self.inner.len();
+ self.inner = vec![*template; len];
+ self.occ = len;
}
}
}