tui: hardcode xterm palette, shimmer blends between fg and bg (#4957)

Instead of querying all 256 terminal colors on startup, which was slow
in some terminals, hardcode the default xterm palette.

Additionally, tweak the shimmer so that it blends between default_fg and
default_bg, instead of "dark gray" (according to the terminal) and pure
white (regardless of terminal theme).
This commit is contained in:
Jeremy Rose
2025-10-08 13:23:13 -07:00
committed by GitHub
parent 96acb8a74e
commit e896db1180
4 changed files with 300 additions and 268 deletions

View File

@@ -277,7 +277,6 @@ impl Tui {
let enhanced_keys_supported = supports_keyboard_enhancement().unwrap_or(false);
// Cache this to avoid contention with the event reader.
supports_color::on_cached(supports_color::Stream::Stdout);
let _ = crate::terminal_palette::terminal_palette();
let _ = crate::terminal_palette::default_colors();
Self {