1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 05:12:40 +03:00

vtparse: add method to determine ground state

Add `VTParser::is_ground`, which is true if the VTParser is in the
"ground" state, i.e. it has no stored state that will affect the
interpretation of future input characters.
This commit is contained in:
Mark Juggurnauth-Thomas 2022-08-01 21:24:52 +01:00 committed by Wez Furlong
parent d03742ff2d
commit 94e8325023

View File

@ -432,6 +432,12 @@ impl VTParser {
}
}
/// Returns if the state machine is in the ground state,
/// i.e. there is no pending state held by the state machine.
pub fn is_ground(&self) -> bool {
self.state == State::Ground
}
fn as_integer_params(&self) -> [i64; MAX_PARAMS] {
let mut res = [0i64; MAX_PARAMS];
let mut i = 0;