From 392b95b179160a1b53ba74c273edcc05480a9a58 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Sat, 25 Jan 2025 10:35:22 +0200 Subject: [PATCH] Use proper path separator for multi buffer headers (#23635) Before: ![bad](https://github.com/user-attachments/assets/ab20836a-b3bb-4b33-8ce4-eecc79d5f02f) After: ![good](https://github.com/user-attachments/assets/40c328d1-2ef1-4a9b-9de9-9be9bba26756) Release Notes: - N/A --- crates/editor/src/element.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index c27daf2aeeb58b976be660e7ab8bb5b052b75cdb..24ee1117e5fc415a0fab18c72c224271580cf452 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -2612,9 +2612,9 @@ impl EditorElement { let filename = path .as_ref() .and_then(|path| Some(path.file_name()?.to_string_lossy().to_string())); - let parent_path = path - .as_ref() - .and_then(|path| Some(path.parent()?.to_string_lossy().to_string() + "/")); + let parent_path = path.as_ref().and_then(|path| { + Some(path.parent()?.to_string_lossy().to_string() + std::path::MAIN_SEPARATOR_STR) + }); let focus_handle = self.editor.focus_handle(cx); let colors = cx.theme().colors();