From af30f3735a5e402509cb14b994576d0ea4799557 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Fri, 28 Jun 2019 20:19:15 +0000 Subject: Fix rows only resetting partially This resolves an issue with rows only resetting partially, based on their `occ` state. However this state is not always accurate, so more than just the occupied elements need to be cleared. Fixes #2340. --- alacritty_terminal/src/grid/row.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'alacritty_terminal') diff --git a/alacritty_terminal/src/grid/row.rs b/alacritty_terminal/src/grid/row.rs index 88a23871..b67f8cd4 100644 --- a/alacritty_terminal/src/grid/row.rs +++ b/alacritty_terminal/src/grid/row.rs @@ -80,9 +80,8 @@ impl Row { } /// Resets contents to the contents of `other` - #[inline(never)] pub fn reset(&mut self, other: &T) { - for item in &mut self.inner[..self.occ] { + for item in &mut self.inner[..] { *item = *other; } self.occ = 0; -- cgit v1.2.3-54-g00ecf