table: Show truncated record differently (#6884)

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
This commit is contained in:
Maxim Zhiburt
2022-10-28 15:00:10 +03:00
committed by GitHub
parent 8838815737
commit 66c2a36123
2 changed files with 51 additions and 10 deletions

View File

@ -71,6 +71,14 @@ impl Table {
self.is_empty
}
pub fn size(&self) -> (usize, usize) {
(self.data.count_rows(), self.data.count_columns())
}
pub fn is_with_index(&self) -> bool {
self.with_index
}
pub fn truncate(&mut self, width: usize, theme: &TableTheme) -> bool {
let mut truncated = false;
while self.data.count_rows() > 0 && self.data.count_columns() > 0 {