mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
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.
This commit is contained in:
parent
a842d6827c
commit
ff09e39309
2 changed files with 5 additions and 12 deletions
|
@ -51,6 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Modifier key combinations like `Ctrl + Q` not generating characters on macOS
|
- Modifier key combinations like `Ctrl + Q` not generating characters on macOS
|
||||||
- Handling of URLs with single quotes
|
- Handling of URLs with single quotes
|
||||||
- Parser reset between DCS escapes
|
- Parser reset between DCS escapes
|
||||||
|
- Parser stopping at unknown DEC private modes/SGR character attributes
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -893,6 +893,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::cognitive_complexity)]
|
||||||
#[inline]
|
#[inline]
|
||||||
fn csi_dispatch(
|
fn csi_dispatch(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
@ -1022,10 +1023,7 @@ where
|
||||||
for arg in args {
|
for arg in args {
|
||||||
match Mode::from_primitive(intermediate, *arg) {
|
match Mode::from_primitive(intermediate, *arg) {
|
||||||
Some(mode) => handler.unset_mode(mode),
|
Some(mode) => handler.unset_mode(mode),
|
||||||
None => {
|
None => unhandled!(),
|
||||||
unhandled!();
|
|
||||||
return;
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1044,10 +1042,7 @@ where
|
||||||
for arg in args {
|
for arg in args {
|
||||||
match Mode::from_primitive(intermediate, *arg) {
|
match Mode::from_primitive(intermediate, *arg) {
|
||||||
Some(mode) => handler.set_mode(mode),
|
Some(mode) => handler.set_mode(mode),
|
||||||
None => {
|
None => unhandled!(),
|
||||||
unhandled!();
|
|
||||||
return;
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1058,10 +1053,7 @@ where
|
||||||
for attr in attrs_from_sgr_parameters(args) {
|
for attr in attrs_from_sgr_parameters(args) {
|
||||||
match attr {
|
match attr {
|
||||||
Some(attr) => handler.terminal_attribute(attr),
|
Some(attr) => handler.terminal_attribute(attr),
|
||||||
None => {
|
None => unhandled!(),
|
||||||
unhandled!();
|
|
||||||
return;
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue