Commit 1c1faa3453

1c1faa3453d2deac92955b4b2cc7f331894c1927

parent: b891f3ae5e

Unregistered key

Matthew Kabat <45803702+Nightchicken@users.noreply.github.com> · 2026-10-21 05:19 UTC
committer: <noreply@github.com>

Avoid setting background colors in `default` ANSI theme (#807)

Co-authored-by: Ulyssa <git@ulyssa.dev>

Layout: unified · split

src/config/theme.rs +2 −10
@@ -17,9 +17,9 @@ pub fn default_theme() -> Theme {
17 messages: ThemeMessages { 17 messages: ThemeMessages {
18 blockquote: LineStylable { 18 blockquote: LineStylable {
19 line: Some(LineName::Thick), 19 line: Some(LineName::Thick),
20 stylable: Stylable::fg(Color::Indexed(236)), 20 stylable: Stylable::fg(Color::Cyan),
21 }, 21 },
22 code: Stylable::bg(Color::Indexed(236)), 22 code: Stylable::fg(Color::Cyan),
23 code_block: LineStylable { 23 code_block: LineStylable {
24 line: Some(LineName::Plain), 24 line: Some(LineName::Plain),
25 stylable: Stylable::default(), 25 stylable: Stylable::default(),
@@ -302,14 +302,6 @@ struct Stylable {
302} 302}
303 303
304impl Stylable { 304impl Stylable {
305 fn bg(c: Color) -> Self {
306 Self {
307 background: Some(c),
308 color: None,
309 modifiers: vec![],
310 }
311 }
312
313 fn fg(c: Color) -> Self { 305 fn fg(c: Color) -> Self {
314 Self { 306 Self {
315 background: None, 307 background: None,
src/message/html.rs +1 −1
@@ -1178,7 +1178,7 @@ pub mod tests {
1178 let s = "<blockquote>Hello world!</blockquote>"; 1178 let s = "<blockquote>Hello world!</blockquote>";
1179 let tree = parse_matrix_html(s); 1179 let tree = parse_matrix_html(s);
1180 let text = tree.to_text(10, Style::default(), &settings, &info); 1180 let text = tree.to_text(10, Style::default(), &settings, &info);
1181 let style = Style::new().fg(Color::Indexed(236)); 1181 let style = Style::new().fg(Color::Cyan);
1182 assert_eq!(text.lines.len(), 2); 1182 assert_eq!(text.lines.len(), 2);
1183 assert_eq!( 1183 assert_eq!(
1184 text.lines[0], 1184 text.lines[0],