Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/document.rs')
-rw-r--r--helix-view/src/document.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index ccf2fa8c..3314a243 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -1741,6 +1741,10 @@ impl Document {
Url::from_file_path(self.path()?).ok()
}
+ pub fn uri(&self) -> Option<helix_core::Uri> {
+ Some(self.path()?.clone().into())
+ }
+
#[inline]
pub fn text(&self) -> &Rope {
&self.text