diff --git a/src/main.rs b/src/main.rs index 4d666181..3766d8d8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -96,11 +96,7 @@ fn main() { .default_value("10") .help("Wait timeout in seconds. If nvim does not response in given time NvimGtk stops") .takes_value(true)) - .arg( - Arg::with_name("enable-swap") - .long("enable-swap") - .help("Enable swap files"), - ).arg(Arg::with_name("files").help("Files to open").multiple(true)) + .arg(Arg::with_name("files").help("Files to open").multiple(true)) .arg( Arg::with_name("nvim-bin-path") .long("nvim-bin-path") diff --git a/src/nvim/mod.rs b/src/nvim/mod.rs index fa25476b..15fa532c 100644 --- a/src/nvim/mod.rs +++ b/src/nvim/mod.rs @@ -85,7 +85,6 @@ pub fn start( nvim_bin_path: Option<&String>, timeout: Option, args_for_neovim: Vec, - enable_swap: bool, ) -> result::Result { let mut cmd = if let Some(path) = nvim_bin_path { Command::new(path) @@ -93,11 +92,6 @@ pub fn start( Command::new("nvim") }; - // Swap files are disabled by default because it shows message window on start up but frontend can't detect it. - if !enable_swap { - cmd.arg("-n"); - } - cmd.arg("--embed") .arg("--cmd") .arg("set termguicolors") diff --git a/src/shell.rs b/src/shell.rs index 4d32552e..aa2b97e4 100644 --- a/src/shell.rs +++ b/src/shell.rs @@ -591,7 +591,6 @@ pub struct ShellOptions { timeout: Option, args_for_neovim: Vec, input_data: Option, - enable_swap: bool, } impl ShellOptions { @@ -611,7 +610,6 @@ impl ShellOptions { .values_of("nvim-args") .map(|args| args.map(str::to_owned).collect()) .unwrap_or(vec![]), - enable_swap: matches.is_present("enable-swap"), } } @@ -1167,7 +1165,6 @@ fn init_nvim_async( options.nvim_bin_path.as_ref(), options.timeout, options.args_for_neovim, - options.enable_swap, ) { Ok(nvim) => nvim, Err(err) => {