diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 0cd62579d..a45d6e1b1 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -2490,9 +2490,13 @@ fn help(cx: &mut compositor::Context, args: &[Cow], event: PromptEvent) -> KeymapResult::NotFound | KeymapResult::Cancelled(_) => { Err(anyhow!("No command found for '{}'", arg)) } - KeymapResult::Pending(_) => Err(anyhow!( - "`:help` for branching keybinds is not yet supported." - )), + KeymapResult::Pending(_) => { + // Clear pending keys + keymaps.get(mode, crate::keymap::macros::key!(Esc)); + Err(anyhow!( + "`:help` for branching keybinds is not yet supported." + )) + } KeymapResult::MatchedSequence(_) => Err(anyhow!( "`:help` for sequence bindings is not yet supported." )),