Fix non-windows builds #83

This commit is contained in:
daa 2018-03-30 00:13:39 +03:00
parent a1f122d19c
commit 53958171c2

View File

@ -79,6 +79,13 @@ impl error::Error for NvimInitError {
}
}
#[cfg(target_os = "windows")]
fn set_windows_creation_flags() {
use std::os::windows::process::CommandExt;
cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW
}
pub fn start(
shell: Arc<UiMutex<shell::State>>,
nvim_bin_path: Option<&String>,
@ -100,10 +107,8 @@ pub fn start(
.arg("let g:GtkGuiLoaded = 1")
.stderr(Stdio::inherit());
if cfg!(windows) {
use std::os::windows::process::CommandExt;
cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW
}
#[cfg(target_os = "windows")]
set_windows_creation_flags();
if let Ok(runtime_path) = env::var("NVIM_GTK_RUNTIME_PATH") {
cmd.arg("--cmd").arg(