diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-08-29 22:06:19 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-08-29 22:08:23 -0400 |
commit | 5be4a5f472655a76e1430bad09a19f6ad111e474 (patch) | |
tree | 1fcffa6c8d37cc6d538b29b6fbd773e8de58512d /src/commands/shell.rs | |
parent | 4f3842b56f1729dcd8e81c77f98253ed9dfb23b3 (diff) |
big rework and dependency update
- abstract JoshutoContext implementation behind functions
- rework io workers in an attempt to fix a bug
- update dependencies
- remove JoshutoContextWorker
Diffstat (limited to 'src/commands/shell.rs')
-rw-r--r-- | src/commands/shell.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/commands/shell.rs b/src/commands/shell.rs index b9cbd1c..5a0c31d 100644 --- a/src/commands/shell.rs +++ b/src/commands/shell.rs @@ -23,8 +23,9 @@ impl ShellCommand { for word in self.words.iter().skip(1) { match word.as_str() { "%s" => { - let curr_tab = context.curr_tab_ref(); - if let Some(curr_list) = curr_tab.curr_list_ref() { + if let Some(curr_list) = + context.tab_context_ref().curr_tab_ref().curr_list_ref() + { let mut i = 0; for entry in curr_list.selected_entries().map(|e| e.file_name()) { command.arg(entry); @@ -59,7 +60,7 @@ impl JoshutoRunnable for ShellCommand { fn execute(&self, context: &mut JoshutoContext, backend: &mut TuiBackend) -> JoshutoResult<()> { backend.terminal_drop(); let res = self.shell_command(context); - ReloadDirList::soft_reload(context.curr_tab_index, context)?; + ReloadDirList::soft_reload(context.tab_context_ref().get_index(), context)?; context .message_queue .push_back(format!("Finished: {}", self.words.join(" "))); |