diff options
Diffstat (limited to 'src/ui/views/tui_folder_view.rs')
-rw-r--r-- | src/ui/views/tui_folder_view.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ui/views/tui_folder_view.rs b/src/ui/views/tui_folder_view.rs index 986612f..d84dde1 100644 --- a/src/ui/views/tui_folder_view.rs +++ b/src/ui/views/tui_folder_view.rs @@ -217,6 +217,11 @@ impl Intersections { } pub fn get_constraints(context: &AppContext) -> &[Constraint; 3] { + let display_options = context.config_ref().display_options_ref(); + if context.tab_context_ref().len() == 0 { + return &display_options.default_layout + } + let preview_context = context.preview_context_ref(); let curr_tab = context.tab_context_ref().curr_tab_ref(); @@ -225,9 +230,6 @@ pub fn get_constraints(context: &AppContext) -> &[Constraint; 3] { let child_list = curr_tab.child_list_ref(); - let config = context.config_ref(); - let display_options = config.display_options_ref(); - if !display_options.collapse_preview() { &display_options.default_layout } else { |