Fix up headers not showing up in :try
This commit is contained in:
parent
b8f44abe9d
commit
8e441f0b2d
|
@ -1,6 +1,5 @@
|
||||||
use super::{record::RecordView, util::nu_style_to_tui, Layout, Orientation, View, ViewConfig};
|
use super::{record::RecordView, util::nu_style_to_tui, Layout, Orientation, View, ViewConfig};
|
||||||
use crate::{
|
use crate::{
|
||||||
explore::TableConfig,
|
|
||||||
nu_common::{collect_pipeline, run_command_with_value},
|
nu_common::{collect_pipeline, run_command_with_value},
|
||||||
pager::{report::Report, Frame, Transition, ViewInfo},
|
pager::{report::Report, Frame, Transition, ViewInfo},
|
||||||
};
|
};
|
||||||
|
@ -22,7 +21,6 @@ pub struct TryView<'a> {
|
||||||
command: String,
|
command: String,
|
||||||
reactive: bool,
|
reactive: bool,
|
||||||
table: Option<RecordView<'a>>,
|
table: Option<RecordView<'a>>,
|
||||||
table_config: TableConfig,
|
|
||||||
view_mode: bool,
|
view_mode: bool,
|
||||||
border_color: Style,
|
border_color: Style,
|
||||||
}
|
}
|
||||||
|
@ -33,7 +31,6 @@ impl<'a> TryView<'a> {
|
||||||
input,
|
input,
|
||||||
table: None,
|
table: None,
|
||||||
reactive: false,
|
reactive: false,
|
||||||
table_config: TableConfig::default(),
|
|
||||||
border_color: Style::default(),
|
border_color: Style::default(),
|
||||||
view_mode: false,
|
view_mode: false,
|
||||||
command: String::new(),
|
command: String::new(),
|
||||||
|
@ -125,6 +122,7 @@ impl View for TryView<'_> {
|
||||||
f.render_widget(table_block, table_area);
|
f.render_widget(table_block, table_area);
|
||||||
|
|
||||||
if let Some(table) = &mut self.table {
|
if let Some(table) = &mut self.table {
|
||||||
|
table.setup(cfg);
|
||||||
let area = Rect::new(
|
let area = Rect::new(
|
||||||
area.x + 2,
|
area.x + 2,
|
||||||
area.y + 4,
|
area.y + 4,
|
||||||
|
@ -242,9 +240,8 @@ impl View for TryView<'_> {
|
||||||
let mut r = RecordView::new(vec![], vec![]);
|
let mut r = RecordView::new(vec![], vec![]);
|
||||||
r.setup(config);
|
r.setup(config);
|
||||||
|
|
||||||
self.table_config = config.explore_config.table;
|
|
||||||
|
|
||||||
if let Some(view) = &mut self.table {
|
if let Some(view) = &mut self.table {
|
||||||
|
view.setup(config);
|
||||||
view.set_orientation(r.get_orientation_current());
|
view.set_orientation(r.get_orientation_current());
|
||||||
view.set_orientation_current(r.get_orientation_current());
|
view.set_orientation_current(r.get_orientation_current());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user