fix setting working dir for editor

This commit is contained in:
steven-omaha
2023-01-10 14:15:29 +01:00
parent e7c024f551
commit 4ded8670ee
+1 -1
View File
@@ -7,7 +7,7 @@ use crate::env::get_editor;
pub fn run_edit_command(files: &[PathBuf]) -> Result<ExitStatus> {
let mut cmd = Command::new(get_editor()?);
cmd.current_dir(&files[0]);
cmd.current_dir(files[0].parent().unwrap());
for f in files {
cmd.arg(f.to_string_lossy().to_string());
}