mirror of
https://github.com/wez/wezterm.git
synced 2024-11-26 08:25:50 +03:00
parent
3316695dc0
commit
41342ef740
@ -29,12 +29,21 @@ fn lookup(state: State, b: u8) -> (Action, State) {
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[cfg(not(test))]
|
||||
fn lookup_entry(state: State) -> Action {
|
||||
unsafe { *ENTRY.get_unchecked(state as usize) }
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[cfg(debug_assertions)]
|
||||
#[cfg(test)]
|
||||
fn lookup_entry(state: State) -> Action {
|
||||
*ENTRY
|
||||
.get(state as usize)
|
||||
.unwrap_or_else(|| panic!("State {:?} has no entry in ENTRY", state))
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[cfg(test)]
|
||||
fn lookup_exit(state: State) -> Action {
|
||||
*EXIT
|
||||
.get(state as usize)
|
||||
@ -42,7 +51,7 @@ fn lookup_exit(state: State) -> Action {
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[cfg(not(test))]
|
||||
fn lookup_exit(state: State) -> Action {
|
||||
unsafe { *EXIT.get_unchecked(state as usize) }
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ pub(crate) static TRANSITIONS: [[u16; 256]; 15] = [
|
||||
define_table!(apc_string),
|
||||
];
|
||||
|
||||
pub(crate) static ENTRY: [Action; 15] = [
|
||||
pub(crate) static ENTRY: [Action; 17] = [
|
||||
Action::None, // Ground
|
||||
Action::Clear, // Escape
|
||||
Action::None, // EscapeIntermediate
|
||||
@ -324,9 +324,11 @@ pub(crate) static ENTRY: [Action; 15] = [
|
||||
Action::OscStart, // OscString
|
||||
Action::None, // SosPmString
|
||||
Action::ApcStart, // ApcString
|
||||
Action::None, // Anywhere
|
||||
Action::None, // Utf8Sequence
|
||||
];
|
||||
|
||||
pub(crate) static EXIT: [Action; 15] = [
|
||||
pub(crate) static EXIT: [Action; 17] = [
|
||||
Action::None, // Ground
|
||||
Action::None, // Escape
|
||||
Action::None, // EscapeIntermediate
|
||||
@ -342,6 +344,8 @@ pub(crate) static EXIT: [Action; 15] = [
|
||||
Action::OscEnd, // OscString
|
||||
Action::None, // SosPmString
|
||||
Action::ApcEnd, // ApcString
|
||||
Action::None, // Anywhere
|
||||
Action::None, // Utf8Sequence
|
||||
];
|
||||
|
||||
#[cfg(test)]
|
||||
|
Loading…
Reference in New Issue
Block a user