aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;