diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index bd1bffdb2..675c1c5b3 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| {