diff options
author | qkzk <qu3nt1n@gmail.com> | 2023-12-22 21:20:38 +0100 |
---|---|---|
committer | qkzk <qu3nt1n@gmail.com> | 2023-12-22 21:20:48 +0100 |
commit | 6fdc43be221cfb852e3067d7a10f5f3ee6147070 (patch) | |
tree | a10be439d421b2bc8121153f502ea2df1dbb657b | |
parent | 189967ad5847f9b8aa7e09e2c1017238765f8a72 (diff) |
rename Goto mode to Cd
-rw-r--r-- | config_files/fm/config.yaml | 2 | ||||
-rw-r--r-- | development.md | 2 | ||||
-rw-r--r-- | src/app/header_footer.rs | 2 | ||||
-rw-r--r-- | src/config/keybindings.rs | 2 | ||||
-rw-r--r-- | src/event/action_map.rs | 4 | ||||
-rw-r--r-- | src/io/display.rs | 4 | ||||
-rw-r--r-- | src/modes/edit/help.rs | 2 |
7 files changed, 10 insertions, 8 deletions
diff --git a/config_files/fm/config.yaml b/config_files/fm/config.yaml index 8560b1c..fb4e6ad 100644 --- a/config_files/fm/config.yaml +++ b/config_files/fm/config.yaml @@ -79,7 +79,7 @@ keys: 'alt-d': ToggleDualPane 'alt-e': EncryptedDrive 'alt-f': Filter - 'alt-g': Goto + 'alt-g': Cd 'alt-m': Chmod 'alt-p': TogglePreviewSecond 'ctrl-c': CopyFilename diff --git a/development.md b/development.md index 3fb03f5..a4c3fa6 100644 --- a/development.md +++ b/development.md @@ -753,6 +753,8 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally. - [x] refactor cli & tui applications using common traits. Simplify tui config file - [x] rename Action::Command to Action::Action since it's what it does - [x] use number of files for dir size +- [x] rename Goto Mode to cd to allow `:` then `cd` +- [ ] parameters in action mode ? - [ ] optionable logging ## TODO diff --git a/src/app/header_footer.rs b/src/app/header_footer.rs index 084550a..9d2eb69 100644 --- a/src/app/header_footer.rs +++ b/src/app/header_footer.rs @@ -10,7 +10,7 @@ mod inner { /// Action for every element of the first line. /// It should match the order of the `FirstLine::make_string` static method. - const HEADER_ACTIONS: [ActionMap; 2] = [ActionMap::Goto, ActionMap::Rename]; + const HEADER_ACTIONS: [ActionMap; 2] = [ActionMap::Cd, ActionMap::Rename]; const FOOTER_ACTIONS: [ActionMap; 7] = [ ActionMap::Nothing, // position diff --git a/src/config/keybindings.rs b/src/config/keybindings.rs index e3a75c9..273de92 100644 --- a/src/config/keybindings.rs +++ b/src/config/keybindings.rs @@ -98,7 +98,7 @@ impl Bindings { (Key::Alt('d'), ActionMap::ToggleDualPane), (Key::Alt('e'), ActionMap::EncryptedDrive), (Key::Alt('f'), ActionMap::Filter), - (Key::Alt('g'), ActionMap::Goto), + (Key::Alt('g'), ActionMap::Cd), (Key::Alt('h'), ActionMap::History), (Key::Alt('i'), ActionMap::CliMenu), (Key::Alt('j'), ActionMap::Jump), 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), diff --git a/src/io/display.rs b/src/io/display.rs index a668729..4d475d4 100644 --- a/src/io/display.rs +++ b/src/io/display.rs @@ -147,7 +147,7 @@ struct WinMain<'a> { impl<'a> Draw for WinMain<'a> { fn draw(&self, canvas: &mut dyn Canvas) -> DrawResult<()> { - canvas.clear()?; + // canvas.clear()?; if self.status.display_settings.dual() && self.is_right() && self.status.display_settings.preview() @@ -764,7 +764,7 @@ struct WinSecondary<'a> { impl<'a> Draw for WinSecondary<'a> { fn draw(&self, canvas: &mut dyn Canvas) -> DrawResult<()> { - canvas.clear()?; + // canvas.clear()?; match self.tab.edit_mode { Edit::Navigate(mode) => self.draw_navigate(mode, canvas), Edit::NeedConfirmation(mode) => self.draw_confirm(mode, canvas), diff --git a/src/modes/edit/help.rs b/src/modes/edit/help.rs index c69f13c..349557f 100644 --- a/src/modes/edit/help.rs +++ b/src/modes/edit/help.rs @@ -87,7 +87,7 @@ Navigate as usual. Most actions works as in 'normal' view. {NewDir:<10}: NEWDIR {NewFile:<10}: NEWFILE {Rename:<10}: RENAME -{Goto:<10}: GOTO +{Cd:<10}: CD {RegexMatch:<10}: REGEXMATCH {Jump:<10}: JUMP {Sort:<10}: SORT |