fix: avoid re-reading system theme from disk on every menu bar render

This commit is contained in:
James Feister 2026-06-12 13:47:00 -07:00 committed by GitHub
parent 8c042673e7
commit 18b4450c0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 36 additions and 15 deletions

View file

@ -613,6 +613,7 @@ impl Terminal {
pub fn set_config(
&mut self,
config: &AppConfig,
color_scheme_kind: ColorSchemeKind,
themes: &HashMap<(String, ColorSchemeKind), Colors>,
) {
let mut update_cell_size = false;
@ -655,7 +656,9 @@ impl Terminal {
update_cell_size = true;
}
if let Some(colors) = themes.get(&config.syntax_theme(self.profile_id_opt)) {
if let Some(colors) =
themes.get(&config.syntax_theme(color_scheme_kind, self.profile_id_opt))
{
let mut changed = false;
for i in 0..color::COUNT {
if self.colors[i] != colors[i] {