Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/ui/statusline.rs')
| -rw-r--r-- | helix-term/src/ui/statusline.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs index 381efd90..ac542137 100644 --- a/helix-term/src/ui/statusline.rs +++ b/helix-term/src/ui/statusline.rs @@ -463,11 +463,11 @@ where F: Fn(&mut RenderContext<'a>, Span<'a>) + Copy, { let title = { - let path = context.doc.path(); - let path = path + let path = context + .doc + .path() .as_ref() - .map(|p| p.to_string_lossy()) - .unwrap_or_else(|| SCRATCH_BUFFER_NAME.into()); + .map_or_else(|| SCRATCH_BUFFER_NAME.into(), |p| p.to_string_lossy()); format!(" {} ", path) }; |