Fix bug getting stuck in non-CSI escapes

Escapes terminated by a bell were not properly handled.
This commit is contained in:
Joe Wilm 2016-07-23 12:37:18 -07:00
parent ae07753242
commit 3426f4a1a9

View file

@ -734,7 +734,14 @@ impl Parser {
C0::LF |
C0::VT |
C0::FF => handler.linefeed(),
C0::BEL => handler.bell(),
C0::BEL => {
// Clear ESC state is in an escape sequence.
if let State::EscapeOther = self.state {
self.state = State::Base;
}
handler.bell();
},
C0::ESC => {
self.csi_reset();
self.state = State::Escape;