Skip to content

Commit

Permalink
Fix selected item highlighting in picker
Browse files Browse the repository at this point in the history
  • Loading branch information
sudormrfbin committed Jul 12, 2022
1 parent 79e05a8 commit 4ef0863
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion helix-term/src/ui/picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,6 @@ impl<T: Item + 'static> Component for Picker<T> {

let table = Table::new(options)
.style(text_style)
// TODO: Patch highlight style into buffer style
.highlight_style(selected)
.highlight_symbol(" > ")
.column_spacing(1)
Expand Down
6 changes: 3 additions & 3 deletions helix-tui/src/widgets/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ impl<'a> Table<'a> {
};
let mut col = table_row_start_col;
for (width, cell) in columns_widths.iter().zip(table_row.cells.iter()) {
if is_selected {
buf.set_style(table_row_area, self.highlight_style);
}
render_cell(
buf,
cell,
Expand All @@ -489,9 +492,6 @@ impl<'a> Table<'a> {
);
col += *width + self.column_spacing;
}
if is_selected {
buf.set_style(table_row_area, self.highlight_style);
}
}
}
}
Expand Down

0 comments on commit 4ef0863

Please sign in to comment.