requery default colors on focus (#4673)

fixes an issue when terminals change their color scheme, e.g. dark/light
mode, the composer wouldn't update its background color.
This commit is contained in:
Jeremy Rose
2025-10-03 15:43:41 -07:00
committed by GitHub
parent 640192ac3d
commit 1b4a79f03c
2 changed files with 56 additions and 7 deletions

View File

@@ -362,6 +362,8 @@ impl Tui {
}
Event::FocusGained => {
terminal_focused.store(true, Ordering::Relaxed);
crate::terminal_palette::requery_default_colors();
yield TuiEvent::Draw;
}
Event::FocusLost => {
terminal_focused.store(false, Ordering::Relaxed);