1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00

Fix parsing of coalesced SGR attributes

cc #116
This commit is contained in:
Joe Wilm 2017-01-08 16:35:59 -08:00
parent 9e713189cc
commit b7f43ac023

View file

@ -627,7 +627,9 @@ impl<'a, H, W> vte::Perform for Performer<'a, H, W>
36 => Attr::Foreground(Color::Named(NamedColor::Cyan)),
37 => Attr::Foreground(Color::Named(NamedColor::White)),
38 => {
if let Some(color) = parse_color(&args[i..], &mut i) {
let mut start = 0;
if let Some(color) = parse_color(&args[i..], &mut start) {
i += start;
Attr::Foreground(color)
} else {
break;
@ -643,7 +645,9 @@ impl<'a, H, W> vte::Perform for Performer<'a, H, W>
46 => Attr::Background(Color::Named(NamedColor::Cyan)),
47 => Attr::Background(Color::Named(NamedColor::White)),
48 => {
if let Some(color) = parse_color(&args[i..], &mut i) {
let mut start = 0;
if let Some(color) = parse_color(&args[i..], &mut start) {
i += start;
Attr::Background(color)
} else {
break;