Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Implement terminal text dimming (#7600)
Robert Clover901279a044ee
diff --git a/crates/terminal_view/src/terminal_element.rs b/crates/terminal_view/src/terminal_element.rsindex 2696a6058c0..4b80e3001a6 100644--- a/crates/terminal_view/src/terminal_element.rs+++ b/crates/terminal_view/src/terminal_element.rs@@ -329,8 +329,13 @@ impl TerminalElement {hyperlink: Option<(HighlightStyle, &RangeInclusive<AlacPoint>)>,) -> TextRun {let flags = indexed.cell.flags;- let fg = convert_color(&fg, &colors);- // let bg = convert_color(&bg, &colors);+ let mut fg = convert_color(&fg, &colors);++ // Ghostty uses (175/255) as the multiplier (~0.69), Alacritty uses 0.66, Kitty+ // uses 0.75. We're using 0.7 because it's pretty well in the middle of that.+ if flags.intersects(Flags::DIM) {+ fg.a *= 0.7;+ }let underline = (flags.intersects(Flags::ALL_UNDERLINES)|| indexed.cell.hyperlink().is_some())