diff options
author | Canop <cano.petrole@gmail.com> | 2021-05-10 20:26:32 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2021-05-10 20:28:28 +0200 |
commit | bf7a12865e27a6310709fa53da3da922cd887169 (patch) | |
tree | 3987b32acaa85b080fc3b5278c7512597120d7f8 /src/app | |
parent | c33b1b33f5f4b2f79ecfb7426718388e795fa29b (diff) |
:print_path on staging area prints all the staged paths
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/panel_state.rs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/app/panel_state.rs b/src/app/panel_state.rs index 4689719..bc439aa 100644 --- a/src/app/panel_state.rs +++ b/src/app/panel_state.rs @@ -351,20 +351,8 @@ pub trait PanelState { } } } - Internal::print_path => { - if let Some(path) = self.selected_path() { - print::print_path(path, con)? - } else { - CmdResult::error("no selection to print") - } - } - Internal::print_relative_path => { - if let Some(path) = self.selected_path() { - print::print_relative_path(path, con)? - } else { - CmdResult::error("no selection to print") - } - } + Internal::print_path => print::print_paths(&self.sel_info(app_state), con)?, + Internal::print_relative_path => print::print_relative_paths(&self.sel_info(app_state), con)?, Internal::refresh => CmdResult::RefreshState { clear_cache: true }, Internal::quit => CmdResult::Quit, _ => CmdResult::Keep, |