Skip to content

Commit

Permalink
Clear with ui.menu style before rendering menu
Browse files Browse the repository at this point in the history
When rendering a completion popup, the popup component will clear
the area with ui.popup and then the menu component would draw over
it using a table component. We remove the left edge of the area
before passing it to the table component (so that it will be left
as padding), and the table component uses ui.menu as the style.
If ui.menu and ui.popup are different the left edge of the popup
will look different from the rest of the popup. We avoid this by
clearing the whole area with ui.menu in Menu::render
  • Loading branch information
sudormrfbin committed Jun 21, 2022
1 parent 31cf6c5 commit 23bc196
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions helix-term/src/ui/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ impl<T: Item + 'static> Component for Menu<T> {
.try_get("ui.menu")
.unwrap_or_else(|| theme.get("ui.text"));
let selected = theme.get("ui.menu.selected");
surface.clear_with(area, style);

let scroll = self.scroll;

Expand Down

0 comments on commit 23bc196

Please sign in to comment.