Fix another case where we could apply highlights with wrong indices (#50367) (cherry-pick to stable) (#50508)

zed-zippy[bot] and Conrad Irwin created

Cherry-pick of #50367 to stable

----
Closes #ISSUE

Release Notes:

- N/A

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Change summary

crates/editor/src/element.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/editor/src/element.rs 🔗

@@ -7954,7 +7954,7 @@ fn apply_dirty_filename_style(
     text_style: &gpui::TextStyle,
     cx: &App,
 ) -> Option<gpui::AnyElement> {
-    let text = segment.text.replace('\n', "⏎");
+    let text = segment.text.replace('\n', " ");
 
     let filename_position = std::path::Path::new(&segment.text)
         .file_name()