1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-26 16:34:23 +03:00

Detect true color set by max_colors

Terminals like `xterm-direct` has max_colors set to 16M. They should be treated as supporting true colors.
This commit is contained in:
Jun Wu 2023-11-03 10:33:15 -07:00 committed by Wez Furlong
parent 7590968257
commit 3f1a120074

View File

@ -219,7 +219,9 @@ impl Capabilities {
if has_true_color {
ColorLevel::TrueColor
} else if let Some(cap::MaxColors(n)) = db.get::<cap::MaxColors>() {
if n >= 256 {
if n >= 16777216 {
ColorLevel::TrueColor
} else if n >= 256 {
ColorLevel::TwoFiftySix
} else {
ColorLevel::Sixteen