Unnamed repository; edit this file 'description' to name the repository.
Improved file reload error message (#6274)
Santiago Vrancovich 2023-03-14
parent 3a4c359 · commit ad855da
-rw-r--r--helix-view/src/document.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index 19220f28..eca60026 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -776,7 +776,7 @@ impl Document {
let path = self
.path()
.filter(|path| path.exists())
- .ok_or_else(|| anyhow!("can't find file to reload from"))?
+ .ok_or_else(|| anyhow!("can't find file to reload from {:?}", self.display_name()))?
.to_owned();
let mut file = std::fs::File::open(&path)?;