aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-07-23 12:37:18 -0700
committerJoe Wilm <joe@jwilm.com>2016-07-23 12:37:18 -0700
commit3426f4a1a9394af01fe7c6319df5c4e1240f8a1f (patch)
tree084d084f0d52f106b4baa719bb60ab95cb7c7e04 /src
parentae07753242e0d8113ee208cc608faf9eadcaf404 (diff)
downloadalacritty-3426f4a1a9394af01fe7c6319df5c4e1240f8a1f.tar.gz
alacritty-3426f4a1a9394af01fe7c6319df5c4e1240f8a1f.zip
Fix bug getting stuck in non-CSI escapes
Escapes terminated by a bell were not properly handled.
Diffstat (limited to 'src')
-rw-r--r--src/ansi.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ansi.rs b/src/ansi.rs
index 496f87d0..46f0b638 100644
--- a/src/ansi.rs
+++ b/src/ansi.rs
@@ -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;