diff options
-rw-r--r-- | src/browser/browser_state.rs | 2 | ||||
-rw-r--r-- | src/filesystems/filesystems_state.rs | 32 |
2 files changed, 33 insertions, 1 deletions
diff --git a/src/browser/browser_state.rs b/src/browser/browser_state.rs index 9adec76..61a1591 100644 --- a/src/browser/browser_state.rs +++ b/src/browser/browser_state.rs @@ -355,7 +355,7 @@ impl AppState for BrowserState { HDir::Right, ) } else { - // we ask the app to focus the panel to the left + // we ask the app to focus the panel to the right AppStateCmdResult::HandleInApp(Internal::panel_right) } } diff --git a/src/filesystems/filesystems_state.rs b/src/filesystems/filesystems_state.rs index 6fdc427..4db277a 100644 --- a/src/filesystems/filesystems_state.rs +++ b/src/filesystems/filesystems_state.rs @@ -475,6 +475,38 @@ impl AppState for FilesystemState { in_new_panel, ) } + Internal::panel_left => { + if cc.areas.is_first() { + // we ask for the creation of a panel to the left + internal_focus::new_panel_on_path( + self.selected_path().to_path_buf(), + screen, + self.tree_options(), + PanelPurpose::None, + &cc.con, + HDir::Left, + ) + } else { + // we ask the app to focus the panel to the left + AppStateCmdResult::HandleInApp(Internal::panel_left) + } + } + Internal::panel_right => { + if cc.areas.is_last() { + // we ask for the creation of a panel to the right + internal_focus::new_panel_on_path( + self.selected_path().to_path_buf(), + screen, + self.tree_options(), + PanelPurpose::None, + &cc.con, + HDir::Right, + ) + } else { + // we ask the app to focus the panel to the right + AppStateCmdResult::HandleInApp(Internal::panel_right) + } + } Internal::page_down => { self.try_scroll(ScrollCommand::Pages(1)); AppStateCmdResult::Keep |