diff --git a/src/cmd_line.rs b/src/cmd_line.rs index c91ac00..c350d79 100644 --- a/src/cmd_line.rs +++ b/src/cmd_line.rs @@ -170,7 +170,12 @@ pub fn handle_command_line_arguments(args: Vec) -> Result<(), String> { neovim_args.push("-p".to_owned()); } - neovim_args.extend::>(files_to_open); + neovim_args.extend::>( + files_to_open + .iter() + .map(|file| file.replace(" ", "\\ ")) + .collect(), + ); /* * Integrate Environment Variables as Defaults to the command-line ones.