From 12a8b850ef10640d226098d6e733b05b00f77789 Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Thu, 27 Mar 2025 20:12:19 +0000 Subject: [PATCH] Fix Terminal theming issue with background/foreground text (#27617) - Closes: https://github.com/zed-industries/zed/issues/27427 Release Notes: - terminal: Fixed an issue where editor theme colors (`text`, `background`) were incorrectly being uses instead of terminal theme colors (`terminal.{foreground,background}`) --- crates/terminal/src/terminal.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs index 99aa5ca4df..83557b41bc 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -2081,8 +2081,9 @@ pub fn get_color_at_index(index: usize, theme: &Theme) -> Hsla { rgba_color(i * step, i * step, i * step) // Map the ANSI-grayscale components to the RGB-grayscale } // For compatibility with the alacritty::Colors interface - 256 => colors.text, - 257 => colors.background, + // See: https://github.com/alacritty/alacritty/blob/master/alacritty_terminal/src/term/color.rs + 256 => colors.terminal_foreground, + 257 => colors.terminal_background, 258 => theme.players().local().cursor, 259 => colors.terminal_ansi_dim_black, 260 => colors.terminal_ansi_dim_red,