42 lines
647 B
Rust
42 lines
647 B
Rust
// src/input/action.rs
|
|
use crate::movement::MovementAction;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
pub enum BufferAction {
|
|
Next,
|
|
Previous,
|
|
Close,
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
pub enum CoreAction {
|
|
Save,
|
|
ForceQuit,
|
|
SaveAndQuit,
|
|
Revert,
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
pub enum AppAction {
|
|
// Global/UI
|
|
ToggleSidebar,
|
|
ToggleBufferList,
|
|
OpenSearch,
|
|
FindFilePaletteToggle,
|
|
|
|
// Buffers
|
|
Buffer(BufferAction),
|
|
|
|
// Command mode
|
|
EnterCommandMode,
|
|
ExitCommandMode,
|
|
CommandExecute,
|
|
CommandBackspace,
|
|
|
|
// Navigation across UI
|
|
Navigate(MovementAction),
|
|
|
|
// Core actions
|
|
Core(CoreAction),
|
|
}
|