diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2019-07-07 14:51:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-07 14:51:11 +0000 |
commit | 165246f50aead3a4311df6304830a6e24ef522c8 (patch) | |
tree | d4fbec4dfb2a7a51f103aa62aa2c560aceec16be /alacritty_terminal/src/window.rs | |
parent | ed7ed473da8ad3147eab32d376a37e391ac7e9db (diff) | |
download | r-alacritty-165246f50aead3a4311df6304830a6e24ef522c8.tar.gz r-alacritty-165246f50aead3a4311df6304830a6e24ef522c8.tar.bz2 r-alacritty-165246f50aead3a4311df6304830a6e24ef522c8.zip |
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.
Diffstat (limited to 'alacritty_terminal/src/window.rs')
-rw-r--r-- | alacritty_terminal/src/window.rs | 15 |
1 files changed, 3 insertions, 12 deletions
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() |