aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authormo8it2024-02-29 23:18:12 +0000
committerBlaž Hrastnik2024-03-19 05:39:46 +0000
commite91ec8e880062c1822d08f47dac48dffeab4548f (patch)
treee9a57487a9da580bf54428e0a8eb1be692e7c1af /helix-term/src
parent6ed93b6e49df2499cd32cc4e4f6dcfe6d416c907 (diff)
Optimize getting a relative path
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/ui/statusline.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs
index c3464067..7437cbd0 100644
--- a/helix-term/src/ui/statusline.rs
+++ b/helix-term/src/ui/statusline.rs
@@ -482,7 +482,7 @@ where
let rel_path = context.doc.relative_path();
let path = rel_path
.as_ref()
- .and_then(|p| p.as_path().file_name().map(|s| s.to_string_lossy()))
+ .and_then(|p| p.file_name().map(|s| s.to_string_lossy()))
.unwrap_or_else(|| SCRATCH_BUFFER_NAME.into());
format!(" {} ", path)
};