diff --git a/src/bridge/mod.rs b/src/bridge/mod.rs index 411fae3..c381b31 100644 --- a/src/bridge/mod.rs +++ b/src/bridge/mod.rs @@ -87,9 +87,9 @@ async fn start_neovim_runtime() { start_ui_command_handler(nvim.clone()); // Verify if the files to open is more than one - if settings.files.len() > 1 { + if settings.target_files.len() > 1 { // Open the rest of the files into new tabs - for file in settings.files.iter().skip(1) { + for file in settings.target_files.iter().skip(1) { nvim.command(format!("tabnew {}", file).as_str()) .await .unwrap_or_explained_panic("Could not create new tab"); diff --git a/src/cmd_line.rs b/src/cmd_line.rs index 510d341..7cfd79d 100644 --- a/src/cmd_line.rs +++ b/src/cmd_line.rs @@ -23,7 +23,7 @@ pub struct CmdLineSettings { pub wayland_app_id: String, pub x11_wm_class: String, // Command-line arguments with multiple files - pub files: Vec, + pub target_files: Vec, } impl Default for CmdLineSettings { @@ -48,7 +48,7 @@ impl Default for CmdLineSettings { wayland_app_id: String::new(), x11_wm_class: String::new(), // Command-line arguments with multiple files - files: vec![], + target_files: vec![], } } } @@ -201,8 +201,7 @@ pub fn handle_command_line_arguments(args: Vec) -> Result<(), String> { .map(|v| v.to_owned()) .or_else(|| std::env::var("NEOVIDE_X11_WM_CLASS").ok()) .unwrap_or_else(|| "neovide".to_owned()), - // Command-line arguments with multiple files - files: matches + target_files: matches .values_of("files_to_open") .map(|opt| opt.map(|v| v.to_owned()).collect()) .unwrap_or_default(),