Fix non-windows builds #83
This commit is contained in:
parent
a1f122d19c
commit
53958171c2
@ -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(
|
pub fn start(
|
||||||
shell: Arc<UiMutex<shell::State>>,
|
shell: Arc<UiMutex<shell::State>>,
|
||||||
nvim_bin_path: Option<&String>,
|
nvim_bin_path: Option<&String>,
|
||||||
@ -100,10 +107,8 @@ pub fn start(
|
|||||||
.arg("let g:GtkGuiLoaded = 1")
|
.arg("let g:GtkGuiLoaded = 1")
|
||||||
.stderr(Stdio::inherit());
|
.stderr(Stdio::inherit());
|
||||||
|
|
||||||
if cfg!(windows) {
|
#[cfg(target_os = "windows")]
|
||||||
use std::os::windows::process::CommandExt;
|
set_windows_creation_flags();
|
||||||
cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW
|
|
||||||
}
|
|
||||||
|
|
||||||
if let Ok(runtime_path) = env::var("NVIM_GTK_RUNTIME_PATH") {
|
if let Ok(runtime_path) = env::var("NVIM_GTK_RUNTIME_PATH") {
|
||||||
cmd.arg("--cmd").arg(
|
cmd.arg("--cmd").arg(
|
||||||
|
Loading…
Reference in New Issue
Block a user