term: Don't print empty tables

Before this change, the table borders would be printed, as well as the
table header if any.
This commit is contained in:
cloudhead
2024-06-12 15:36:34 +02:00
parent 6966c97194
commit d9fa83f9da
+5
View File
@@ -92,6 +92,11 @@ where
let inner = self.inner(parent);
let cols = inner.cols;
// Don't print empty tables.
if self.is_empty() {
return lines;
}
if let Some(color) = border {
lines.push(
Line::default()