on master help sign in
Canonicalize the path on open to avoid duplicates.
commit418ee17b86c24f03699659f4aa91b331a68e5666 authorBlaž Hrastnik <blaz@mxxn.io> dateFri 7 May 2021, 14:30 (5 years ago) parent7c915dc
1 file changed+2
helix-view/src/editor.rs+2
helix-view/src/editor.rs+2
@@ -119,6 +119,8 @@ impl Editor {
119119 }
120120
121121 pub fn open(&mut self, path: PathBuf, action: Action) -> Result<DocumentId, Error> {
122+ let path = std::fs::canonicalize(path)?;
123+
122124 let id = self
123125 .documents()
124126 .find(|doc| doc.path() == Some(&path))