mirror of
https://github.com/nushell/nushell.git
synced 2025-01-22 14:18:55 +01:00
Cleanup header to work like before (#2039)
This commit is contained in:
parent
1420cbafe4
commit
c56cbd0f6b
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -4617,12 +4617,12 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "which"
|
name = "which"
|
||||||
version = "3.1.1"
|
version = "4.0.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724"
|
checksum = "b5fe1a9cb33fe7cf77d431070d0223e544b1e4e7f7764bad0a3e691a6678a131"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"failure",
|
|
||||||
"libc",
|
"libc",
|
||||||
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -406,7 +406,10 @@ impl WrappedTable {
|
|||||||
self.print_separator(SeparatorPosition::Top);
|
self.print_separator(SeparatorPosition::Top);
|
||||||
}
|
}
|
||||||
|
|
||||||
if !self.headers.is_empty() {
|
let skip_headers = (self.headers.len() == 2 && self.headers[1].max_width == 0)
|
||||||
|
|| (self.headers.len() == 1 && self.headers[0].max_width == 0);
|
||||||
|
|
||||||
|
if !self.headers.is_empty() && !skip_headers {
|
||||||
self.print_cell_contents(&self.headers);
|
self.print_cell_contents(&self.headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -420,7 +423,7 @@ impl WrappedTable {
|
|||||||
} else {
|
} else {
|
||||||
first_row = false;
|
first_row = false;
|
||||||
|
|
||||||
if self.theme.separate_header && !self.headers.is_empty() {
|
if self.theme.separate_header && !self.headers.is_empty() && !skip_headers {
|
||||||
self.print_separator(SeparatorPosition::Middle);
|
self.print_separator(SeparatorPosition::Middle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user