rsvim_core 0.1.3-alpha.2

The core library for RSVIM text editor.
Documentation
//! The select mode.

use crate::state::State;
use crate::state::StateContext;
use crate::state::Stateful;
use crate::state::ops::Operation;
use crossterm::event::Event;

#[derive(Debug, Copy, Clone, Default, PartialEq, Eq, Hash)]
/// The select editing mode.
pub struct Select {}

impl Stateful for Select {
  fn handle(&self, _context: &StateContext, _event: Event) -> State {
    State::Select(Select::default())
  }
  fn handle_op(&self, _context: &StateContext, _op: Operation) -> State {
    State::Select(Select::default())
  }
}