From c4d2725e14ca9488b1b086024bf827c66945ae7b Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Wed, 10 Jul 2019 21:17:20 +0000 Subject: Fix row occ not set during new and reset Since ref tests were only stored whenever winit requested the window close, they would not get stored properly when the terminal was closed through Alacritty using `exit`, Ctrl+D or similar. This moves the ref test code to the and of the main entry point, which will always be executed regardless of how the terminal was shutdown. Fixes #2613. --- alacritty_terminal/src/grid/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alacritty_terminal/src/grid/mod.rs') diff --git a/alacritty_terminal/src/grid/mod.rs b/alacritty_terminal/src/grid/mod.rs index 792dd844..1925a6f4 100644 --- a/alacritty_terminal/src/grid/mod.rs +++ b/alacritty_terminal/src/grid/mod.rs @@ -565,7 +565,7 @@ impl Grid { /// This is used only for initializing after loading ref-tests pub fn initialize_all(&mut self, template: &T) where - T: Copy, + T: Copy + GridCell, { let history_size = self.raw.len().saturating_sub(*self.lines); self.raw.initialize(self.max_scroll_limit - history_size, Row::new(self.cols, template)); -- cgit v1.2.3-54-g00ecf