@@ -5,11 +5,12 @@ use termion::event::Key;
55
66use crate :: context:: AppContext ;
77use crate :: error:: { AppError , AppErrorKind , AppResult } ;
8- use crate :: history:: DirectoryHistory ;
98use crate :: io:: { FileOperation , FileOperationOptions , IoWorkerThread } ;
109use crate :: ui:: widgets:: TuiPrompt ;
1110use crate :: ui:: AppBackend ;
1211
12+ use super :: tab_ops;
13+
1314fn prompt ( context : & mut AppContext , backend : & mut AppBackend , paths_len : usize ) -> bool {
1415 let ch = {
1516 let prompt_str = format ! ( "Delete {} files? (Y/n)" , paths_len) ;
@@ -93,14 +94,7 @@ pub fn delete_selected_files(
9394 delete_files ( context, paths, background, permanently) ?;
9495 }
9596
96- let curr_tab = context. tab_context_ref ( ) . curr_tab_ref ( ) ;
97- let config = context. config_ref ( ) . clone ( ) ;
98- let options = context. config_ref ( ) . display_options_ref ( ) . clone ( ) ;
99- let curr_path = curr_tab. cwd ( ) . to_path_buf ( ) ;
100- for ( _, tab) in context. tab_context_mut ( ) . iter_mut ( ) {
101- let tab_options = tab. option_ref ( ) . clone ( ) ;
102- tab. history_mut ( )
103- . reload ( & curr_path, & config, & options, & tab_options) ?;
104- }
97+ let curr_path = context. tab_context_ref ( ) . curr_tab_ref ( ) . cwd ( ) . to_path_buf ( ) ;
98+ tab_ops:: reload_all_tabs ( context, curr_path. as_path ( ) ) ?;
10599 Ok ( ( ) )
106100}
0 commit comments