diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-03-20 11:55:27 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-03-20 11:55:27 -0400 |
commit | 84e912b7779faaaeb09d1085e09630a548c7fb54 (patch) | |
tree | 662665d1b7f1401ac9259bd6fa12e5e6aa2890ec /src/commands/delete_files.rs | |
parent | bd779fc6df4641f81bbbfe50663d883d64a5c88e (diff) |
Add more reloading triggers
Diffstat (limited to 'src/commands/delete_files.rs')
-rw-r--r-- | src/commands/delete_files.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/commands/delete_files.rs b/src/commands/delete_files.rs index 85fe4b6..c70cee7 100644 --- a/src/commands/delete_files.rs +++ b/src/commands/delete_files.rs @@ -6,6 +6,7 @@ use termion::event::Key; use crate::commands::{JoshutoCommand, JoshutoRunnable, ReloadDirList}; use crate::context::JoshutoContext; use crate::error::JoshutoResult; +use crate::history::DirectoryHistory; use crate::ui::widgets::TuiPrompt; use crate::ui::TuiBackend; use crate::util::load_child::LoadChild; @@ -90,6 +91,12 @@ impl std::fmt::Display for DeleteFiles { impl JoshutoRunnable for DeleteFiles { fn execute(&self, context: &mut JoshutoContext, backend: &mut TuiBackend) -> JoshutoResult<()> { Self::delete_files(context, backend)?; + + let options = &context.config_t.sort_option; + let curr_path = context.tabs[context.curr_tab_index].curr_path.clone(); + for tab in context.tabs.iter_mut() { + tab.history.reload(&curr_path, options); + } LoadChild::load_child(context)?; Ok(()) } |