summaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
authormo8it2024-02-29 23:18:12 +0000
committerBlaž Hrastnik2024-03-19 05:39:46 +0000
commite91ec8e880062c1822d08f47dac48dffeab4548f (patch)
treee9a57487a9da580bf54428e0a8eb1be692e7c1af /helix-view
parent6ed93b6e49df2499cd32cc4e4f6dcfe6d416c907 (diff)
Optimize getting a relative path
Diffstat (limited to 'helix-view')
-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 4e7b1de9..5f3595ee 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -1685,7 +1685,7 @@ impl Document {
&self.selections
}
- pub fn relative_path(&self) -> Option<PathBuf> {
+ pub fn relative_path(&self) -> Option<Cow<Path>> {
self.path
.as_deref()
.map(helix_stdx::path::get_relative_path)