pub trait ConditionalEventHandler: Send + Sync {
// Required method
fn handle(
&self,
evt: &Event,
n: usize,
positive: bool,
ctx: &EventContext<'_>,
) -> Option<Cmd>;
}
Expand description
May behave differently depending on:
- edit mode (emacs vs vi)
- vi input mode (insert vs replace vs command modes)
- empty line
- cursor position
- repeat count
- original key pressed (when same command is bound to different key)
- hint
- …