From f2a347466654444b2e5cd3947687de2b049beeaf Mon Sep 17 00:00:00 2001 From: KyleBarton Date: Fri, 19 Dec 2025 20:43:14 -0800 Subject: [PATCH] Fix build. Add truncate_start to buffer headers filepath. --- crates/editor/src/element.rs | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 843def5e6c8bc8d202c78dc957aefc1cd7f756ec..0376ed6916f0e426122961fa4eebb1001fe9b0fb 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -46,9 +46,9 @@ use gpui::{ KeybindingKeystroke, Length, Modifiers, ModifiersChangedEvent, MouseButton, MouseClickEvent, MouseDownEvent, MouseMoveEvent, MousePressureEvent, MouseUpEvent, PaintQuad, ParentElement, Pixels, PressureStage, ScrollDelta, ScrollHandle, ScrollWheelEvent, ShapedLine, SharedString, - Size, StatefulInteractiveElement, Style, Styled, TextAlign, TextRun, TextStyleRefinement, - WeakEntity, Window, anchored, deferred, div, fill, linear_color_stop, linear_gradient, outline, - point, px, quad, relative, size, solid_background, transparent_black, + Size, StatefulInteractiveElement, Style, Styled, StyledText, TextAlign, TextRun, + TextStyleRefinement, WeakEntity, Window, anchored, deferred, div, fill, linear_color_stop, + linear_gradient, outline, point, px, quad, relative, size, solid_background, transparent_black, }; use itertools::Itertools; use language::{IndentGuideSettings, language_settings::ShowWhitespaceSetting}; @@ -4084,14 +4084,20 @@ impl EditorElement { })), ) .when_some(parent_path, |then, path| { - // TODO: Swap to use `truncate_start()` - then.child(Label::new(path).buffer_font(cx).truncate().color( - if file_status.is_some_and(FileStatus::is_deleted) { - Color::Custom(colors.text_disabled) - } else { - Color::Custom(colors.text_muted) - }, - )) + then.child( + Label::new(path) + .buffer_font(cx) + .truncate_start() + .color( + if file_status + .is_some_and(FileStatus::is_deleted) + { + Color::Custom(colors.text_disabled) + } else { + Color::Custom(colors.text_muted) + }, + ), + ) }) .when_some(breadcrumbs, |then, breadcrumbs| { then.child(self.render_breadcrumb_text(