mirror of
https://github.com/helix-editor/helix.git
synced 2025-10-06 00:13:28 +02:00
feat: allow moving nonexistent file (#13748)
This commit is contained in:
@@ -1437,7 +1437,11 @@ impl Editor {
|
||||
log::error!("failed to apply workspace edit: {err:?}")
|
||||
}
|
||||
}
|
||||
fs::rename(old_path, &new_path)?;
|
||||
|
||||
if old_path.exists() {
|
||||
fs::rename(old_path, &new_path)?;
|
||||
}
|
||||
|
||||
if let Some(doc) = self.document_by_path(old_path) {
|
||||
self.set_doc_path(doc.id(), &new_path);
|
||||
}
|
||||
|
Reference in New Issue
Block a user