save game

This commit is contained in:
Gerrit Viljoen 2020-05-17 12:26:38 +02:00
parent 7d75017e72
commit 36113ce9f7

View File

@ -360,12 +360,19 @@ impl SmartString {
}
buf.push(ch);
} else {
if ch != '\u{1b}' && ch != '[' && ch != ';' && ch != 'm' && !('0'..'9').contains(&ch) {
if ch == 'm' {
buf.push(ch);
fragments.push((visible, buf));
visible = !visible;
buf = String::new();
} else if ch != '[' && ch != ';' && !('0'..'9').contains(&ch) {
fragments.push((visible, buf));
visible = !visible;
buf = String::new();
}
buf.push(ch);
} else {
buf.push(ch);
}
}
}
if !buf.is_empty() {