From f193705ca78bfdf2221f56ad73cf1e2f4b0a79d2 Mon Sep 17 00:00:00 2001 From: Nikita Revenco <154856872+NikitaRevenco@users.noreply.github.com> Date: Tue, 18 Feb 2025 15:38:56 +0000 Subject: [PATCH] feat: add main separator when showing current file's directory --- helix-term/src/ui/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index bd1bffdb..675c1c5b 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -439,7 +439,7 @@ pub fn file_explorer( path, |path| { path.parent() - .map(|p| p.display().to_string()) + .map(|p| format!("{}{}", p.display(), std::path::MAIN_SEPARATOR)) .unwrap_or_default() }, |cursor, cx, path, to_create_str| { @@ -609,7 +609,7 @@ pub fn file_explorer( path, |path| { path.parent() - .map(|p| p.display().to_string()) + .map(|p| format!("{}{}", p.display(), std::path::MAIN_SEPARATOR)) .unwrap_or_default() }, |cursor, cx, copy_from, copy_to_str| {