Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add red background to blocks that need styling
Antonio Scandurra7f5014b34a29
diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rsindex d02521fac1d..ebe78d95b3e 100644--- a/crates/editor2/src/editor.rs+++ b/crates/editor2/src/editor.rs@@ -9974,6 +9974,8 @@ pub fn diagnostic_block_renderer(diagnostic: Diagnostic, is_valid: bool) -> Rendlet message = message.clone();v_stack().id(cx.block_id)+ .size_full()+ .bg(gpui::red()).children(highlighted_lines.iter().map(|(line, highlights)| {div().child(HighlightedLabel::new(line.clone(), highlights.clone()))diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rsindex 38b54ea2b15..638ed338919 100644--- a/crates/editor2/src/element.rs+++ b/crates/editor2/src/element.rs@@ -21,7 +21,7 @@ use gpui::{point, px, relative, size, transparent_black, Action, AnyElement, AvailableSpace, BorrowWindow,Bounds, Component, ContentMask, Corners, DispatchPhase, Edges, Element, ElementId,ElementInputHandler, Entity, Hsla, Line, MouseButton, MouseDownEvent, MouseMoveEvent,- MouseUpEvent, ParentElement, Pixels, ScrollWheelEvent, Size, Style, TextRun, TextStyle,+ MouseUpEvent, ParentElement, Pixels, ScrollWheelEvent, Size, Style, Styled, TextRun, TextStyle,ViewContext, WindowContext,};use itertools::Itertools;@@ -2057,12 +2057,18 @@ impl EditorElement {}h_stack()+ .size_full()+ .bg(gpui::red()).child(filename.unwrap_or_else(|| "untitled".to_string())).children(parent_path).children(jump_icon) // .p_x(gutter_padding)} else {let text_style = style.text.clone();- h_stack().child("⋯").children(jump_icon) // .p_x(gutter_padding)+ h_stack()+ .size_full()+ .bg(gpui::red())+ .child("⋯")+ .children(jump_icon) // .p_x(gutter_padding)};element.render()}