mirror of
https://github.com/helix-editor/helix
synced 2024-09-21 00:34:57 +02:00
Canonicalize the path on open to avoid duplicates.
This commit is contained in:
parent
7c915dc065
commit
418ee17b86
@ -119,6 +119,8 @@ impl Editor {
|
||||
}
|
||||
|
||||
pub fn open(&mut self, path: PathBuf, action: Action) -> Result<DocumentId, Error> {
|
||||
let path = std::fs::canonicalize(path)?;
|
||||
|
||||
let id = self
|
||||
.documents()
|
||||
.find(|doc| doc.path() == Some(&path))
|
||||
|
Loading…
Reference in New Issue
Block a user