aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helix-view/src/editor.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index e9f027f3..84d499e3 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -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))