diff options
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/change_directory.rs | 6 | ||||
-rw-r--r-- | src/commands/delete_files.rs | 2 | ||||
-rw-r--r-- | src/commands/open_file.rs | 2 | ||||
-rw-r--r-- | src/commands/parent_directory.rs | 2 | ||||
-rw-r--r-- | src/commands/reload_dir.rs | 2 | ||||
-rw-r--r-- | src/commands/rename_file.rs | 2 | ||||
-rw-r--r-- | src/commands/show_hidden.rs | 8 | ||||
-rw-r--r-- | src/commands/tab_operations.rs | 2 | ||||
-rw-r--r-- | src/commands/tab_switch.rs | 2 |
9 files changed, 14 insertions, 14 deletions
diff --git a/src/commands/change_directory.rs b/src/commands/change_directory.rs index ae77964..8406940 100644 --- a/src/commands/change_directory.rs +++ b/src/commands/change_directory.rs @@ -47,11 +47,11 @@ impl ChangeDirectory { curr_tab .history - .populate_to_root(&curr_tab.curr_path, &context.config_t.sort_type); + .populate_to_root(&curr_tab.curr_path, &context.config_t.sort_option); curr_tab.curr_list = match curr_tab .history - .pop_or_create(&curr_tab.curr_path, &context.config_t.sort_type) + .pop_or_create(&curr_tab.curr_path, &context.config_t.sort_option) { Ok(s) => Some(s), Err(e) => { @@ -63,7 +63,7 @@ impl ChangeDirectory { if let Some(parent) = curr_tab.curr_path.parent() { curr_tab.parent_list = match curr_tab .history - .pop_or_create(&parent, &context.config_t.sort_type) + .pop_or_create(&parent, &context.config_t.sort_option) { Ok(s) => Some(s), Err(e) => { diff --git a/src/commands/delete_files.rs b/src/commands/delete_files.rs index 1875b39..f450e57 100644 --- a/src/commands/delete_files.rs +++ b/src/commands/delete_files.rs @@ -63,7 +63,7 @@ impl JoshutoRunnable for DeleteFiles { } let curr_tab = &mut context.tabs[context.curr_tab_index]; - curr_tab.reload_contents(&context.config_t.sort_type); + curr_tab.reload_contents(&context.config_t.sort_option); curr_tab.refresh( &view, &context.config_t, diff --git a/src/commands/open_file.rs b/src/commands/open_file.rs index 3cbdc2c..ad71b51 100644 --- a/src/commands/open_file.rs +++ b/src/commands/open_file.rs @@ -65,7 +65,7 @@ impl OpenFile { curr_tab.curr_list = match curr_tab .history - .pop_or_create(&path, &context.config_t.sort_type) + .pop_or_create(&path, &context.config_t.sort_option) { Ok(s) => Some(s), Err(e) => { diff --git a/src/commands/parent_directory.rs b/src/commands/parent_directory.rs index 4542af7..fe219df 100644 --- a/src/commands/parent_directory.rs +++ b/src/commands/parent_directory.rs @@ -33,7 +33,7 @@ impl ParentDirectory { Some(parent) => { curr_tab.parent_list = match curr_tab .history - .pop_or_create(&parent, &context.config_t.sort_type) + .pop_or_create(&parent, &context.config_t.sort_option) { Ok(s) => Some(s), Err(e) => { diff --git a/src/commands/reload_dir.rs b/src/commands/reload_dir.rs index d842b00..7b03ded 100644 --- a/src/commands/reload_dir.rs +++ b/src/commands/reload_dir.rs @@ -16,7 +16,7 @@ impl ReloadDirList { pub fn reload(context: &mut JoshutoContext, view: &JoshutoView) { let curr_tab = &mut context.tabs[context.curr_tab_index]; - curr_tab.reload_contents(&context.config_t.sort_type); + curr_tab.reload_contents(&context.config_t.sort_option); curr_tab.refresh( view, &context.config_t, diff --git a/src/commands/rename_file.rs b/src/commands/rename_file.rs index 2165277..9a07de1 100644 --- a/src/commands/rename_file.rs +++ b/src/commands/rename_file.rs @@ -71,7 +71,7 @@ impl RenameFile { Ok(_) => { let curr_tab = &mut context.tabs[context.curr_tab_index]; if let Some(ref mut s) = curr_tab.curr_list { - s.update_contents(&context.config_t.sort_type).unwrap(); + s.update_contents(&context.config_t.sort_option).unwrap(); } curr_tab.refresh_curr(&view.mid_win, context.config_t.scroll_offset); } diff --git a/src/commands/show_hidden.rs b/src/commands/show_hidden.rs index 12f08c5..be41264 100644 --- a/src/commands/show_hidden.rs +++ b/src/commands/show_hidden.rs @@ -14,12 +14,12 @@ impl ToggleHiddenFiles { "toggle_hidden" } pub fn toggle_hidden(context: &mut JoshutoContext) { - let opposite = !context.config_t.sort_type.show_hidden(); - context.config_t.sort_type.set_show_hidden(opposite); + let opposite = !context.config_t.sort_option.show_hidden; + context.config_t.sort_option.show_hidden = opposite; for tab in &mut context.tabs { tab.history.depecrate_all_entries(); - tab.reload_contents(&context.config_t.sort_type); + tab.reload_contents(&context.config_t.sort_option); } } } @@ -36,7 +36,7 @@ impl JoshutoRunnable for ToggleHiddenFiles { fn execute(&self, context: &mut JoshutoContext, view: &JoshutoView) { Self::toggle_hidden(context); let curr_tab = &mut context.tabs[context.curr_tab_index]; - curr_tab.reload_contents(&context.config_t.sort_type); + curr_tab.reload_contents(&context.config_t.sort_option); curr_tab.refresh( view, &context.config_t, diff --git a/src/commands/tab_operations.rs b/src/commands/tab_operations.rs index ca8e977..d1a15a9 100644 --- a/src/commands/tab_operations.rs +++ b/src/commands/tab_operations.rs @@ -27,7 +27,7 @@ impl NewTab { } }; - match JoshutoTab::new(curr_path, &context.config_t.sort_type) { + match JoshutoTab::new(curr_path, &context.config_t.sort_option) { Ok(tab) => { context.tabs.push(tab); context.curr_tab_index = context.tabs.len() - 1; diff --git a/src/commands/tab_switch.rs b/src/commands/tab_switch.rs index b0102b5..49e3210 100644 --- a/src/commands/tab_switch.rs +++ b/src/commands/tab_switch.rs @@ -26,7 +26,7 @@ impl TabSwitch { Ok(_) => { { let curr_tab = &mut context.tabs[context.curr_tab_index]; - curr_tab.reload_contents(&context.config_t.sort_type); + curr_tab.reload_contents(&context.config_t.sort_option); curr_tab.refresh( view, &context.config_t, |