pub mode-related types
This commit is contained in:
parent
7fff70ce84
commit
b7f9c8ba2e
|
@ -47,23 +47,23 @@ pub struct Cursor {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default)]
|
#[derive(Clone, Debug, Default)]
|
||||||
struct NormalState {
|
pub struct NormalState {
|
||||||
pub error: Option<String>,
|
pub error: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default)]
|
#[derive(Clone, Debug, Default)]
|
||||||
struct CommandState {
|
pub struct CommandState {
|
||||||
pub buf: String,
|
pub buf: String,
|
||||||
pub cursor: usize,
|
pub cursor: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
struct InsertState {
|
pub struct InsertState {
|
||||||
append: bool,
|
append: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
enum Mode {
|
pub enum Mode {
|
||||||
Normal(NormalState),
|
Normal(NormalState),
|
||||||
Command(CommandState),
|
Command(CommandState),
|
||||||
Visual,
|
Visual,
|
||||||
|
|
Loading…
Reference in New Issue