From 8e441f0b2df19771f3df15c6a10a710058b68671 Mon Sep 17 00:00:00 2001 From: Reilly Wood Date: Wed, 5 Jun 2024 20:05:51 -0700 Subject: [PATCH] Fix up headers not showing up in :try --- crates/nu-explore/src/views/try.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/nu-explore/src/views/try.rs b/crates/nu-explore/src/views/try.rs index 3475b13203..9acbb84208 100644 --- a/crates/nu-explore/src/views/try.rs +++ b/crates/nu-explore/src/views/try.rs @@ -1,6 +1,5 @@ use super::{record::RecordView, util::nu_style_to_tui, Layout, Orientation, View, ViewConfig}; use crate::{ - explore::TableConfig, nu_common::{collect_pipeline, run_command_with_value}, pager::{report::Report, Frame, Transition, ViewInfo}, }; @@ -22,7 +21,6 @@ pub struct TryView<'a> { command: String, reactive: bool, table: Option>, - table_config: TableConfig, view_mode: bool, border_color: Style, } @@ -33,7 +31,6 @@ impl<'a> TryView<'a> { input, table: None, reactive: false, - table_config: TableConfig::default(), border_color: Style::default(), view_mode: false, command: String::new(), @@ -125,6 +122,7 @@ impl View for TryView<'_> { f.render_widget(table_block, table_area); if let Some(table) = &mut self.table { + table.setup(cfg); let area = Rect::new( area.x + 2, area.y + 4, @@ -242,9 +240,8 @@ impl View for TryView<'_> { let mut r = RecordView::new(vec![], vec![]); r.setup(config); - self.table_config = config.explore_config.table; - if let Some(view) = &mut self.table { + view.setup(config); view.set_orientation(r.get_orientation_current()); view.set_orientation_current(r.get_orientation_current()); }