Skip to main content

lookup_normal

Function lookup_normal 

Source
pub fn lookup_normal(
    handle: &KeymapHandle,
    chord: &KeyChord,
    active_minor_modes: &[ModeId],
) -> Option<Action>
Expand description

Look up a single-key event in the Normal-mode catalog. Returns Some(action) when the chord is bound; None to signal the caller (input::translate_normal) to fall back to its legacy match arm for the not-yet-migrated bindings.

event should arrive after the legacy CTRL guard, the numeric prefix accumulator, and the recording-macro q special-case in translate_normal – this helper is the last stop before the legacy match. CTRL-bearing chords are passed through untouched (the trie has no CTRL bindings yet – they migrate in 8.g.vi).

Slice 8.g.ii: g and z are partial trie nodes (children only, no terminal binding). LookupResult::Partial on those chords surfaces here as Some(Action::SetPending(AfterG / AfterZ)) so the dispatcher arms the second-key resolver. Other partial paths still return None (no caller produces them today; future sub-slices can extend this match arm).