Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Apply `terminal.foreground` and `terminal.background` from theme (#14281)

Zak Johnson3a410942b48f
diff --git a/crates/terminal_view/src/terminal_element.rs b/crates/terminal_view/src/terminal_element.rs
index de6da6e099c..c6b5a3fc27c 100644
--- a/crates/terminal_view/src/terminal_element.rs
+++ b/crates/terminal_view/src/terminal_element.rs
@@ -656,12 +656,12 @@ impl Element for TerminalElement {
font_size: font_size.into(),
font_style: FontStyle::Normal,
line_height: line_height.into(),
- background_color: None,
+ background_color: Some(theme.colors().terminal_background),
white_space: WhiteSpace::Normal,
// These are going to be overridden per-cell
underline: None,
strikethrough: None,
- color: theme.colors().text,
+ color: theme.colors().terminal_foreground,
};
let text_system = cx.text_system();
@@ -1141,8 +1141,8 @@ pub fn convert_color(fg: &terminal::alacritty_terminal::vte::ansi::Color, theme:
NamedColor::BrightMagenta => colors.terminal_ansi_bright_magenta,
NamedColor::BrightCyan => colors.terminal_ansi_bright_cyan,
NamedColor::BrightWhite => colors.terminal_ansi_bright_white,
- NamedColor::Foreground => colors.text,
- NamedColor::Background => colors.background,
+ NamedColor::Foreground => colors.terminal_foreground,
+ NamedColor::Background => colors.terminal_background,
NamedColor::Cursor => theme.players().local().cursor,
NamedColor::DimBlack => colors.terminal_ansi_dim_black,
NamedColor::DimRed => colors.terminal_ansi_dim_red,