fix setting working dir for editor
This commit is contained in:
1 parent
71a07d2da1
commit
1c1770240f
1 file changed
+1
-1
+1
-1
@@ -7,7 +7,7 @@ use crate::env::get_editor;
|
|||||||
|
|
||||||
pub fn run_edit_command(files: &[PathBuf]) -> Result<ExitStatus> {
|
pub fn run_edit_command(files: &[PathBuf]) -> Result<ExitStatus> {
|
||||||
let mut cmd = Command::new(get_editor()?);
|
let mut cmd = Command::new(get_editor()?);
|
||||||
cmd.current_dir(&files[0]);
|
cmd.current_dir(files[0].parent().unwrap());
|
||||||
for f in files {
|
for f in files {
|
||||||
cmd.arg(f.to_string_lossy().to_string());
|
cmd.arg(f.to_string_lossy().to_string());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user