Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
editor: Improve text color in document color highlight (#39372)
Jason Leed7ffc37b149e
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rsindex c726de49475..944715a0dfa 100644--- a/crates/editor/src/element.rs+++ b/crates/editor/src/element.rs@@ -8931,10 +8931,20 @@ impl Element for EditorElement {cx,);+ let merged_highlighted_ranges =+ if let Some((_, colors)) = document_colors.as_ref() {+ &highlighted_ranges+ .clone()+ .into_iter()+ .chain(colors.clone())+ .collect()+ } else {+ &highlighted_ranges+ };let bg_segments_per_row = Self::bg_segments_per_row(start_row..end_row,&selections,- &highlighted_ranges,+ &merged_highlighted_ranges,self.style.background,);