From 165246f50aead3a4311df6304830a6e24ef522c8 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sun, 7 Jul 2019 14:51:11 +0000 Subject: Fix saving of ref tests 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. --- alacritty_terminal/src/window.rs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'alacritty_terminal/src/window.rs') diff --git a/alacritty_terminal/src/window.rs b/alacritty_terminal/src/window.rs index 204a1f73..d4c673ba 100644 --- a/alacritty_terminal/src/window.rs +++ b/alacritty_terminal/src/window.rs @@ -252,10 +252,7 @@ impl Window { } #[cfg(not(any(target_os = "macos", windows)))] - pub fn get_platform_window( - title: &str, - window_config: &WindowConfig, - ) -> WindowBuilder { + pub fn get_platform_window(title: &str, window_config: &WindowConfig) -> WindowBuilder { use glutin::os::unix::WindowBuilderExt; let decorations = match window_config.decorations { @@ -287,10 +284,7 @@ impl Window { } #[cfg(windows)] - pub fn get_platform_window( - title: &str, - window_config: &WindowConfig, - ) -> WindowBuilder { + pub fn get_platform_window(title: &str, window_config: &WindowConfig) -> WindowBuilder { let decorations = match window_config.decorations { Decorations::None => false, _ => true, @@ -308,10 +302,7 @@ impl Window { } #[cfg(target_os = "macos")] - pub fn get_platform_window( - title: &str, - window_config: &WindowConfig, - ) -> WindowBuilder { + pub fn get_platform_window(title: &str, window_config: &WindowConfig) -> WindowBuilder { use glutin::os::macos::WindowBuilderExt; let window = WindowBuilder::new() -- cgit