Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-tui/src/widgets/table.rs')
| -rw-r--r-- | helix-tui/src/widgets/table.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/helix-tui/src/widgets/table.rs b/helix-tui/src/widgets/table.rs index 5f4667b7..9c67a376 100644 --- a/helix-tui/src/widgets/table.rs +++ b/helix-tui/src/widgets/table.rs @@ -37,14 +37,8 @@ pub struct Cell<'a> { impl Cell<'_> { /// Set the `Style` of this cell. pub fn style(mut self, style: Style) -> Self { - self.set_style(style); - self - } - - /// Set the `Style` of this cell. - pub fn set_style(&mut self, style: Style) { self.style = style; - self.content.patch_style(style); + self } } @@ -337,7 +331,6 @@ impl<'a> Table<'a> { } } -/// Track [Table] scroll offset and selection #[derive(Debug, Default, Clone)] pub struct TableState { pub offset: usize, @@ -459,9 +452,6 @@ impl Table<'_> { }; if is_selected { buf.set_style(table_row_area, self.highlight_style); - for cell in &mut table_row.cells { - cell.set_style(self.highlight_style); - } } let mut col = table_row_start_col; for (width, cell) in columns_widths.iter().zip(table_row.cells.iter()) { |