Explicitly detach from the console on exit
Without this cmd won't redraw it's prompt when alacritty exits
This commit is contained in:
parent
a54cc4ec60
commit
df82b5ffbd
|
@ -43,7 +43,7 @@ use std::os::unix::io::AsRawFd;
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
extern crate winapi;
|
extern crate winapi;
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use winapi::um::wincon::{AttachConsole, ATTACH_PARENT_PROCESS};
|
use winapi::um::wincon::{AttachConsole, FreeConsole, ATTACH_PARENT_PROCESS};
|
||||||
|
|
||||||
use alacritty::cli;
|
use alacritty::cli;
|
||||||
use alacritty::config::{self, Config};
|
use alacritty::config::{self, Config};
|
||||||
|
@ -272,5 +272,9 @@ fn run(mut config: Config, options: &cli::Options) -> Result<(), Box<Error>> {
|
||||||
// FIXME patch notify library to have a shutdown method
|
// FIXME patch notify library to have a shutdown method
|
||||||
// config_reloader.join().ok();
|
// config_reloader.join().ok();
|
||||||
|
|
||||||
|
// Without explicitly detaching the console cmd won't redraw it's prompt
|
||||||
|
#[cfg(windows)]
|
||||||
|
unsafe { FreeConsole(); }
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue