summaryrefslogtreecommitdiffstats
path: root/src/event/action_map.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/action_map.rs')
-rw-r--r--src/event/action_map.rs51
1 files changed, 22 insertions, 29 deletions
diff --git a/src/event/action_map.rs b/src/event/action_map.rs
index a64f28d..3e27d5d 100644
--- a/src/event/action_map.rs
+++ b/src/event/action_map.rs
@@ -28,7 +28,7 @@ pub enum ActionMap {
CopyPaste,
CutPaste,
Delete,
- DeleteFile,
+ DeleteLine,
DisplayFlagged,
EncryptedDrive,
End,
@@ -36,6 +36,10 @@ pub enum ActionMap {
Exec,
Filter,
FlagAll,
+ FocusGoLeft,
+ FocusGoRight,
+ FocusGoDown,
+ FocusGoUp,
FuzzyFind,
FuzzyFindHelp,
FuzzyFindLine,
@@ -44,24 +48,17 @@ pub enum ActionMap {
Help,
History,
Home,
- Jump,
KeyHome,
LazyGit,
Log,
MarksJump,
MarksNew,
- MocpAddToPlayList,
- MocpClearPlaylist,
- MocpGoToSong,
- MocpNext,
- MocpPrevious,
- MocpTogglePause,
MoveDown,
MoveLeft,
MoveRight,
MoveUp,
Ncdu,
- NextSibling,
+ NextThing,
NewDir,
NewFile,
Nothing,
@@ -73,7 +70,7 @@ pub enum ActionMap {
PageDown,
PageUp,
Preview,
- PreviousSibling,
+ PreviousThing,
Quit,
RefreshIfNeeded,
RefreshView,
@@ -112,13 +109,13 @@ impl ActionMap {
/// Makes the junction between `Actions` and `Events`.
/// Every Action links to a different `EventExec` method.
pub fn matcher(&self, status: &mut Status, binds: &Bindings) -> Result<()> {
- let current_tab = status.current_tab_mut();
match self {
Self::Action => EventAction::action(status),
Self::Back => EventAction::back(status),
Self::BackTab => EventAction::backtab(status),
Self::Backspace => EventAction::backspace(status),
Self::Bulk => EventAction::bulk(status),
+ Self::Cd => EventAction::cd(status),
Self::Chmod => EventAction::chmod(status),
Self::ClearFlags => EventAction::clear_flags(status),
Self::CliMenu => EventAction::cli_menu(status),
@@ -129,7 +126,7 @@ impl ActionMap {
Self::CopyPaste => EventAction::copy_paste(status),
Self::CutPaste => EventAction::cut_paste(status),
Self::Delete => EventAction::delete(status),
- Self::DeleteFile => EventAction::delete_file(status),
+ Self::DeleteLine => EventAction::delete_line(status),
Self::DisplayFlagged => EventAction::display_flagged(status),
Self::EncryptedDrive => EventAction::encrypted_drive(status),
Self::End => EventAction::end(status),
@@ -137,33 +134,29 @@ impl ActionMap {
Self::Exec => EventAction::exec(status),
Self::Filter => EventAction::filter(status),
Self::FlagAll => EventAction::flag_all(status),
+ Self::FocusGoLeft => EventAction::focus_go_left(status),
+ Self::FocusGoRight => EventAction::focus_go_right(status),
+ Self::FocusGoDown => EventAction::focus_go_down(status),
+ Self::FocusGoUp => EventAction::focus_go_up(status),
Self::FuzzyFind => EventAction::fuzzyfind(status),
Self::FuzzyFindHelp => EventAction::fuzzyfind_help(status, binds),
Self::FuzzyFindLine => EventAction::fuzzyfind_line(status),
Self::GoRoot => EventAction::go_root(status),
Self::GoStart => EventAction::go_start(status),
- Self::Cd => EventAction::cd(status),
Self::Help => EventAction::help(status, binds),
Self::History => EventAction::history(status),
Self::Home => EventAction::home(status),
- Self::Jump => EventAction::jump(status),
Self::KeyHome => EventAction::key_home(status),
- Self::Log => EventAction::log(current_tab),
+ Self::Log => EventAction::log(status),
Self::LazyGit => EventAction::lazygit(status),
Self::MarksJump => EventAction::marks_jump(status),
Self::MarksNew => EventAction::marks_new(status),
- Self::MocpAddToPlayList => EventAction::mocp_add_to_playlist(current_tab),
- Self::MocpClearPlaylist => EventAction::mocp_clear_playlist(),
- Self::MocpGoToSong => EventAction::mocp_go_to_song(status),
- Self::MocpNext => EventAction::mocp_next(),
- Self::MocpPrevious => EventAction::mocp_previous(),
- Self::MocpTogglePause => EventAction::mocp_toggle_pause(status),
Self::MoveDown => EventAction::move_down(status),
Self::MoveLeft => EventAction::move_left(status),
Self::MoveRight => EventAction::move_right(status),
Self::MoveUp => EventAction::move_up(status),
- Self::NextSibling => EventAction::next_sibling(current_tab),
Self::Ncdu => EventAction::ncdu(status),
+ Self::NextThing => EventAction::next_thing(status),
Self::NewDir => EventAction::new_dir(status),
Self::NewFile => EventAction::new_file(status),
Self::NvimFilepicker => EventAction::nvim_filepicker(status),
@@ -173,10 +166,10 @@ impl ActionMap {
Self::OpenAll => EventAction::open_all(status),
Self::PageDown => EventAction::page_down(status),
Self::PageUp => EventAction::page_up(status),
- Self::Preview => EventAction::preview(current_tab),
- Self::PreviousSibling => EventAction::previous_sibling(current_tab),
+ Self::Preview => EventAction::preview(status),
+ Self::PreviousThing => EventAction::previous_thing(status),
Self::Quit => EventAction::quit(status),
- Self::RefreshIfNeeded => EventAction::refresh_if_needed(current_tab),
+ Self::RefreshIfNeeded => EventAction::refresh_if_needed(status),
Self::RefreshView => EventAction::refresh_view(status),
Self::RegexMatch => EventAction::regex_match(status),
Self::RemoteMount => EventAction::remote_mount(status),
@@ -195,16 +188,16 @@ impl ActionMap {
Self::ToggleDisplayFull => EventAction::toggle_display_full(status),
Self::ToggleDualPane => EventAction::toggle_dualpane(status),
Self::ToggleFlag => EventAction::toggle_flag(status),
- Self::ToggleHidden => EventAction::toggle_hidden(current_tab),
+ Self::ToggleHidden => EventAction::toggle_hidden(status),
Self::TogglePreviewSecond => EventAction::toggle_preview_second(status),
Self::TrashEmpty => EventAction::trash_empty(status),
Self::TrashMoveFile => EventAction::trash_move_file(status),
Self::TrashOpen => EventAction::trash_open(status),
Self::TrashRestoreFile => LeaveMode::trash(status),
Self::Tree => EventAction::tree(status),
- Self::TreeFold => EventAction::tree_fold(current_tab),
- Self::TreeFoldAll => EventAction::tree_fold_all(current_tab),
- Self::TreeUnFoldAll => EventAction::tree_unfold_all(current_tab),
+ Self::TreeFold => EventAction::tree_fold(status),
+ Self::TreeFoldAll => EventAction::tree_fold_all(status),
+ Self::TreeUnFoldAll => EventAction::tree_unfold_all(status),
Self::TuiMenu => EventAction::tui_menu(status),
Self::Custom(string) => EventAction::custom(status, string),