Skip to main content

register_operator_bindings_in

Function register_operator_bindings_in 

Source
pub fn register_operator_bindings_in(
    layer: KeymapLayer,
    binding_source: SourceLocation,
    handle: &KeymapHandle,
    op_prefix: &[ChordPattern],
    op: OperatorId,
    doubled_self: Option<ChordPattern>,
    builtins: &Builtins,
    syntax_textobjects: &SyntaxTextObjectIds,
    syntax_motions: &SyntaxMotionIds,
    post_motion_char: bool,
)
Expand description

CM.2: register_operator_bindings with the layer chosen by the caller.

Extracted rather than adding a parameter to the function above, because fifteen native call sites all want Builtin and churning them to say so would be noise. The one caller that wants something else is the plugin path: a plugin operator’s chords belong to its minor mode, not to the universal grammar. Bound at Builtin a plugin’s gc would outlive :set <id>.enabled=false, pointing at a handler that is gone.