diff options
author | Christian Duerr <contact@christianduerr.com> | 2020-02-15 20:00:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-15 20:00:53 +0000 |
commit | ff09e393090ebe1ac01322823e3b1fe373a253bf (patch) | |
tree | c11ca37b18907ea7737afeba61d7b4cf4d2838c5 /alacritty_terminal | |
parent | a842d6827c74108156f0f21e34ff93c2a7a349fb (diff) |
Fix parser stopping at unknown modes
This resolves an issue in the parser where it would stop as soon as the
first unknown value is encountered in private mode/sgr attribute
escapes.
Fixes #3339.
Diffstat (limited to 'alacritty_terminal')
-rw-r--r-- | alacritty_terminal/src/ansi.rs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/alacritty_terminal/src/ansi.rs b/alacritty_terminal/src/ansi.rs index 0877fbff..a554ab72 100644 --- a/alacritty_terminal/src/ansi.rs +++ b/alacritty_terminal/src/ansi.rs @@ -893,6 +893,7 @@ where } } + #[allow(clippy::cognitive_complexity)] #[inline] fn csi_dispatch( &mut self, @@ -1022,10 +1023,7 @@ where for arg in args { match Mode::from_primitive(intermediate, *arg) { Some(mode) => handler.unset_mode(mode), - None => { - unhandled!(); - return; - }, + None => unhandled!(), } } }, @@ -1044,10 +1042,7 @@ where for arg in args { match Mode::from_primitive(intermediate, *arg) { Some(mode) => handler.set_mode(mode), - None => { - unhandled!(); - return; - }, + None => unhandled!(), } } }, @@ -1058,10 +1053,7 @@ where for attr in attrs_from_sgr_parameters(args) { match attr { Some(attr) => handler.terminal_attribute(attr), - None => { - unhandled!(); - return; - }, + None => unhandled!(), } } } |