1 parent
9fc89e621f
commit
b6faedf31f
1 file changed
+23
@@ -444,6 +444,7 @@ impl VTParser {
|
||||
for src in &self.params[0..self.num_params] {
|
||||
if let CsiParam::Integer(value) = src {
|
||||
res[i] = *value;
|
||||
} else if let CsiParam::P(b';') = src {
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
@@ -1103,4 +1104,26 @@ mod test {
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ommitted_dcs_param() {
|
||||
assert_eq!(
|
||||
parse_as_vec("\x1bP;1q\x1b\\".as_bytes()),
|
||||
vec![
|
||||
VTAction::DcsHook {
|
||||
byte: b'q',
|
||||
params: vec![0, 1],
|
||||
intermediates: vec![],
|
||||
ignored_excess_intermediates: false,
|
||||
},
|
||||
VTAction::DcsUnhook,
|
||||
VTAction::EscDispatch {
|
||||
params: vec![],
|
||||
intermediates: vec![],
|
||||
ignored_excess_intermediates: false,
|
||||
byte: b'\\',
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user