libterm: fix incorrect bg index decode

This commit is contained in:
2026-03-31 17:12:03 +03:00
parent 6d31142258
commit 7064a21d8d
+1 -1
View File
@@ -402,7 +402,7 @@ impl CsiState {
(30..=37, _) => CharacterAttribute::FgIndex(Some(pm as u8 - 30)),
(39, _) => CharacterAttribute::FgIndex(None),
// Ps = 4 x ⇒ Set background color
(40..=47, _) => CharacterAttribute::BgIndex(Some(pm as u8 - 30)),
(40..=47, _) => CharacterAttribute::BgIndex(Some(pm as u8 - 40)),
(49, _) => CharacterAttribute::BgIndex(None),
// Ps = 9 x ⇒ Set foreground color
(90..=97, _) => CharacterAttribute::FgIndex(Some(pm as u8 - 90)),