Skip to main content

register_multibuffer_ex_commands

Function register_multibuffer_ex_commands 

Source
pub fn register_multibuffer_ex_commands(registry: &mut CommandRegistry)
Expand description

K.2.5 (2026-06-02): register :multibuffer-expand [n] and :multibuffer-contract [n] ex-commands.

Relocated from crates/lattice-host/src/multibuffer_keymap.rs::register_multibuffer_ex_commands as part of the K.2.5 migration that moves multibuffer keymap + ex-command registration into its owning crate. Boot path in editor_boot.rs now calls this directly instead of the host glue. Behaviour preserved verbatim:

Both commands take an optional non-negative integer (default 5 — Zed precedent). apply produces Effect::AppAction(AppEffect::MultibufferExpand { delta }) where delta is positive for expand, negative for contract. The host’s apply_effect arm calls the substrate helper multibuffer_expand_excerpt_at (M.10.4, 2026-06-03), which looks up the active view via MultibufferRegistry and calls expand_excerpt_at at the active cursor’s row.

No-op when invoked on a non-multibuffer active buffer (no registry entry for the buffer id).