From ed471d3cbfb03c97df874330d185c1b346165a2c Mon Sep 17 00:00:00 2001 From: qkzk Date: Fri, 15 Dec 2023 22:23:21 +0100 Subject: FIX: in tree mode, refresh also refresh the window. Incorrect number of file displayed --- src/event/action_map.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/event/action_map.rs') diff --git a/src/event/action_map.rs b/src/event/action_map.rs index 9a15485..feaf39e 100644 --- a/src/event/action_map.rs +++ b/src/event/action_map.rs @@ -60,6 +60,7 @@ pub enum ActionMap { MoveLeft, MoveRight, MoveUp, + NextSibling, NewDir, NewFile, Nothing, @@ -70,6 +71,7 @@ pub enum ActionMap { PageDown, PageUp, Preview, + PreviousSibling, Quit, RefreshIfNeeded, RefreshView, @@ -126,7 +128,6 @@ impl ActionMap { Self::CutPaste => EventAction::cut_paste(status), Self::Delete => EventAction::delete(status), Self::DeleteFile => EventAction::delete_file(status), - Self::Ncdu => EventAction::ncdu(status), Self::EncryptedDrive => EventAction::encrypted_drive(status), Self::End => EventAction::end(status), Self::Enter => EventAction::enter(status, binds), @@ -158,6 +159,8 @@ impl ActionMap { 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::NewDir => EventAction::new_dir(current_tab), Self::NewFile => EventAction::new_file(current_tab), Self::NvimFilepicker => EventAction::nvim_filepicker(status), @@ -167,6 +170,7 @@ impl ActionMap { 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::Quit => EventAction::quit(status), Self::RefreshIfNeeded => EventAction::refresh_if_needed(current_tab), Self::RefreshView => EventAction::refresh_view(status), -- cgit v1.2.3 From 8c418972c68266cde6d01180a4575a47697c3e6b Mon Sep 17 00:00:00 2001 From: qkzk Date: Sat, 16 Dec 2023 15:38:38 +0100 Subject: FIX: while second window is opened, if the selection is below half screen, it's not shown anymore. --- src/event/action_map.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/event/action_map.rs') diff --git a/src/event/action_map.rs b/src/event/action_map.rs index feaf39e..8d5d7c6 100644 --- a/src/event/action_map.rs +++ b/src/event/action_map.rs @@ -131,8 +131,8 @@ impl ActionMap { Self::EncryptedDrive => EventAction::encrypted_drive(status), Self::End => EventAction::end(status), Self::Enter => EventAction::enter(status, binds), - Self::Exec => EventAction::exec(current_tab), - Self::Filter => EventAction::filter(current_tab), + Self::Exec => EventAction::exec(status), + Self::Filter => EventAction::filter(status), Self::FlagAll => EventAction::flag_all(status), Self::FuzzyFind => EventAction::fuzzyfind(status), Self::FuzzyFindHelp => EventAction::fuzzyfind_help(status, binds), @@ -141,14 +141,14 @@ impl ActionMap { Self::GoStart => EventAction::go_start(status), Self::Goto => EventAction::goto(status), Self::Help => EventAction::help(status, binds), - Self::History => EventAction::history(current_tab), + 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::LazyGit => EventAction::lazygit(status), Self::MarksJump => EventAction::marks_jump(status), - Self::MarksNew => EventAction::marks_new(current_tab), + 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), @@ -161,10 +161,10 @@ impl ActionMap { Self::MoveUp => EventAction::move_up(status), Self::NextSibling => EventAction::next_sibling(current_tab), Self::Ncdu => EventAction::ncdu(status), - Self::NewDir => EventAction::new_dir(current_tab), - Self::NewFile => EventAction::new_file(current_tab), + Self::NewDir => EventAction::new_dir(status), + Self::NewFile => EventAction::new_file(status), Self::NvimFilepicker => EventAction::nvim_filepicker(status), - Self::NvimSetAddress => EventAction::set_nvim_server(current_tab), + Self::NvimSetAddress => EventAction::set_nvim_server(status), Self::OpenConfig => EventAction::open_config(status), Self::OpenFile => EventAction::open_file(status), Self::PageDown => EventAction::page_down(status), @@ -174,18 +174,18 @@ impl ActionMap { Self::Quit => EventAction::quit(status), Self::RefreshIfNeeded => EventAction::refresh_if_needed(current_tab), Self::RefreshView => EventAction::refresh_view(status), - Self::RegexMatch => EventAction::regex_match(current_tab), - Self::RemoteMount => EventAction::remote_mount(current_tab), + Self::RegexMatch => EventAction::regex_match(status), + Self::RemoteMount => EventAction::remote_mount(status), Self::RemovableDevices => EventAction::removable_devices(status), Self::Rename => EventAction::rename(status), Self::ResetMode => EventAction::reset_mode(status), Self::ReverseFlags => EventAction::reverse_flags(status), - Self::Search => EventAction::search(current_tab), + Self::Search => EventAction::search(status), Self::SearchNext => EventAction::search_next(status), Self::Shell => EventAction::shell(status), - Self::ShellCommand => EventAction::shell_command(current_tab), + Self::ShellCommand => EventAction::shell_command(status), Self::Shortcut => EventAction::shortcut(status), - Self::Sort => EventAction::sort(current_tab), + Self::Sort => EventAction::sort(status), Self::Symlink => EventAction::symlink(status), Self::Tab => EventAction::tab(status), Self::ToggleDisplayFull => EventAction::toggle_display_full(status), @@ -197,11 +197,11 @@ impl ActionMap { Self::TrashMoveFile => EventAction::trash_move_file(status), Self::TrashOpen => EventAction::trash_open(status), Self::TrashRestoreFile => LeaveMode::trash(status), - Self::Tree => EventAction::tree(current_tab), + 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::TuiMenu => EventAction::tui_menu(current_tab), + Self::TuiMenu => EventAction::tui_menu(status), Self::Custom(string) => EventAction::custom(status, string), Self::Nothing => Ok(()), -- cgit v1.2.3 From ef54cb8201881912bb9cda5b918d9056a0fa49cf Mon Sep 17 00:00:00 2001 From: qkzk Date: Mon, 18 Dec 2023 21:17:44 +0100 Subject: rename command mode to action mode. Display "exec" mode as "open with" --- src/event/action_map.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/event/action_map.rs') diff --git a/src/event/action_map.rs b/src/event/action_map.rs index 8d5d7c6..f3ebbd3 100644 --- a/src/event/action_map.rs +++ b/src/event/action_map.rs @@ -12,6 +12,7 @@ use crate::modes::LeaveMode; /// actions in the application. #[derive(Clone, Debug, Display, EnumString, EnumIter)] pub enum ActionMap { + Action, Back, BackTab, Backspace, @@ -19,7 +20,6 @@ pub enum ActionMap { Chmod, ClearFlags, CliMenu, - Command, Compress, Context, CopyFilename, @@ -112,6 +112,7 @@ impl ActionMap { 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(current_tab), Self::BackTab => EventAction::backtab(status), Self::Backspace => EventAction::backspace(status), @@ -119,7 +120,6 @@ impl ActionMap { Self::Chmod => EventAction::chmod(status), Self::ClearFlags => EventAction::clear_flags(status), Self::CliMenu => EventAction::cli_menu(status), - Self::Command => EventAction::command(status), Self::Compress => EventAction::compress(status), Self::Context => EventAction::context(status), Self::CopyFilename => EventAction::copy_filename(current_tab), -- cgit v1.2.3 From 6fdc43be221cfb852e3067d7a10f5f3ee6147070 Mon Sep 17 00:00:00 2001 From: qkzk Date: Fri, 22 Dec 2023 21:20:38 +0100 Subject: rename Goto mode to Cd --- src/event/action_map.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/event/action_map.rs') diff --git a/src/event/action_map.rs b/src/event/action_map.rs index f3ebbd3..3d3312a 100644 --- a/src/event/action_map.rs +++ b/src/event/action_map.rs @@ -17,6 +17,7 @@ pub enum ActionMap { BackTab, Backspace, Bulk, + Cd, Chmod, ClearFlags, CliMenu, @@ -40,7 +41,6 @@ pub enum ActionMap { FuzzyFindLine, GoRoot, GoStart, - Goto, Help, History, Home, @@ -139,7 +139,7 @@ impl ActionMap { Self::FuzzyFindLine => EventAction::fuzzyfind_line(status), Self::GoRoot => EventAction::go_root(status), Self::GoStart => EventAction::go_start(status), - Self::Goto => EventAction::goto(status), + Self::Cd => EventAction::goto(status), Self::Help => EventAction::help(status, binds), Self::History => EventAction::history(status), Self::Home => EventAction::home(status), -- cgit v1.2.3 From fde10a65507fe838c1fbb73dfa11777783b21794 Mon Sep 17 00:00:00 2001 From: qkzk Date: Fri, 22 Dec 2023 22:24:29 +0100 Subject: rename every goto ref to cd --- src/event/action_map.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/event/action_map.rs') diff --git a/src/event/action_map.rs b/src/event/action_map.rs index 3d3312a..1a96be7 100644 --- a/src/event/action_map.rs +++ b/src/event/action_map.rs @@ -139,7 +139,7 @@ impl ActionMap { Self::FuzzyFindLine => EventAction::fuzzyfind_line(status), Self::GoRoot => EventAction::go_root(status), Self::GoStart => EventAction::go_start(status), - Self::Cd => EventAction::goto(status), + Self::Cd => EventAction::cd(status), Self::Help => EventAction::help(status, binds), Self::History => EventAction::history(status), Self::Home => EventAction::home(status), -- cgit v1.2.3 From 7f4c73cc86faaa2984c35ca700f64b86567a1f60 Mon Sep 17 00:00:00 2001 From: qkzk Date: Wed, 3 Jan 2024 21:21:53 +0100 Subject: open all fuzzy, display fuzzy as flagged --- src/event/action_map.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/event/action_map.rs') diff --git a/src/event/action_map.rs b/src/event/action_map.rs index 1a96be7..833c301 100644 --- a/src/event/action_map.rs +++ b/src/event/action_map.rs @@ -68,6 +68,7 @@ pub enum ActionMap { NvimSetAddress, OpenConfig, OpenFile, + OpenAll, PageDown, PageUp, Preview, @@ -167,6 +168,7 @@ impl ActionMap { Self::NvimSetAddress => EventAction::set_nvim_server(status), Self::OpenConfig => EventAction::open_config(status), Self::OpenFile => EventAction::open_file(status), + Self::OpenAll => EventAction::open_all(status), Self::PageDown => EventAction::page_down(status), Self::PageUp => EventAction::page_up(status), Self::Preview => EventAction::preview(current_tab), -- cgit v1.2.3 From 085010d4b88a299f69fc37b7cf264409ababb2c1 Mon Sep 17 00:00:00 2001 From: qkzk Date: Wed, 3 Jan 2024 22:18:32 +0100 Subject: display fuzzy with F. ideas... --- src/event/action_map.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/event/action_map.rs') diff --git a/src/event/action_map.rs b/src/event/action_map.rs index 833c301..5974c61 100644 --- a/src/event/action_map.rs +++ b/src/event/action_map.rs @@ -29,7 +29,7 @@ pub enum ActionMap { CutPaste, Delete, DeleteFile, - Ncdu, + DisplayFuzzy, EncryptedDrive, End, Enter, @@ -60,6 +60,7 @@ pub enum ActionMap { MoveLeft, MoveRight, MoveUp, + Ncdu, NextSibling, NewDir, NewFile, @@ -129,6 +130,7 @@ impl ActionMap { Self::CutPaste => EventAction::cut_paste(status), Self::Delete => EventAction::delete(status), Self::DeleteFile => EventAction::delete_file(status), + Self::DisplayFuzzy => EventAction::display_fuzzy(status), Self::EncryptedDrive => EventAction::encrypted_drive(status), Self::End => EventAction::end(status), Self::Enter => EventAction::enter(status, binds), -- cgit v1.2.3 From 9656f16179bb873c025adac096e4e6d3e3b06e69 Mon Sep 17 00:00:00 2001 From: qkzk Date: Thu, 4 Jan 2024 22:52:57 +0100 Subject: merge flagged & fuzzy --- src/event/action_map.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/event/action_map.rs') diff --git a/src/event/action_map.rs b/src/event/action_map.rs index 5974c61..a21495a 100644 --- a/src/event/action_map.rs +++ b/src/event/action_map.rs @@ -29,7 +29,7 @@ pub enum ActionMap { CutPaste, Delete, DeleteFile, - DisplayFuzzy, + DisplayFlagged, EncryptedDrive, End, Enter, @@ -130,7 +130,7 @@ impl ActionMap { Self::CutPaste => EventAction::cut_paste(status), Self::Delete => EventAction::delete(status), Self::DeleteFile => EventAction::delete_file(status), - Self::DisplayFuzzy => EventAction::display_fuzzy(status), + Self::DisplayFlagged => EventAction::display_flagged(status), Self::EncryptedDrive => EventAction::encrypted_drive(status), Self::End => EventAction::end(status), Self::Enter => EventAction::enter(status, binds), -- cgit v1.2.3 From df76e74ce36d7b92a9c471f60ae85df7675396b7 Mon Sep 17 00:00:00 2001 From: qkzk Date: Sat, 6 Jan 2024 23:31:46 +0100 Subject: flagged: copy filename & filepath --- src/event/action_map.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/event/action_map.rs') diff --git a/src/event/action_map.rs b/src/event/action_map.rs index a21495a..d61d653 100644 --- a/src/event/action_map.rs +++ b/src/event/action_map.rs @@ -124,8 +124,8 @@ impl ActionMap { Self::CliMenu => EventAction::cli_menu(status), Self::Compress => EventAction::compress(status), Self::Context => EventAction::context(status), - Self::CopyFilename => EventAction::copy_filename(current_tab), - Self::CopyFilepath => EventAction::copy_filepath(current_tab), + Self::CopyFilename => EventAction::copy_filename(status), + Self::CopyFilepath => EventAction::copy_filepath(status), Self::CopyPaste => EventAction::copy_paste(status), Self::CutPaste => EventAction::cut_paste(status), Self::Delete => EventAction::delete(status), -- cgit v1.2.3 From 623a1bbe981129e1c9d27a851de3bba2f41c15b6 Mon Sep 17 00:00:00 2001 From: qkzk Date: Mon, 8 Jan 2024 22:05:05 +0100 Subject: Move back & leave_mode history should use the same status method --- src/event/action_map.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/event/action_map.rs') diff --git a/src/event/action_map.rs b/src/event/action_map.rs index d61d653..a64f28d 100644 --- a/src/event/action_map.rs +++ b/src/event/action_map.rs @@ -115,7 +115,7 @@ impl ActionMap { let current_tab = status.current_tab_mut(); match self { Self::Action => EventAction::action(status), - Self::Back => EventAction::back(current_tab), + Self::Back => EventAction::back(status), Self::BackTab => EventAction::backtab(status), Self::Backspace => EventAction::backspace(status), Self::Bulk => EventAction::bulk(status), -- cgit v1.2.3