//! Downcast helpers from the editor's type-erased discipline slot to
//! [`VimState`] (#265 G3 / #267).
//!
//! The engine stores the active keyboard discipline as
//! `Box<dyn DisciplineState>` and never names a concrete discipline type. The
//! vim FSM reaches its own state back through these two helpers, which are the
//! *only* place in this crate that performs the downcast.
use crateVimState;
use Editor;
use Host;
/// Borrow the vim FSM state out of `ed`'s discipline slot.
///
/// Panics if a different discipline is installed. That is a wiring bug — vim
/// input was dispatched at an `Editor` that never had the vim discipline
/// installed — not a runtime condition worth recovering from.
pub
/// Mutable counterpart of [`vim`].
pub