From f9375f449c8b7bbf792c88b89903fe38d524f2e5 Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Sat, 21 Aug 2021 10:51:20 +0530 Subject: Refactor new Rect construction (#575) * Refactor new Rect construction Introduces methods that can be chained to construct new Rects out of pre-existing ones * Clamp x and y to edges in Rect chop methods * Rename Rect clipping functions--- helix-term/src/ui/menu.rs | 8 -------- 1 file changed, 8 deletions(-) (limited to 'helix-term/src/ui/menu.rs') diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs index 3e63db35..a56cf19b 100644 --- a/helix-term/src/ui/menu.rs +++ b/helix-term/src/ui/menu.rs @@ -304,14 +304,6 @@ impl Component for Menu { }, ); - // // TODO: set bg for the whole row if selected - // if line == self.cursor { - // surface.set_style( - // Rect::new(area.x, area.y + i as u16, area.width - 1, 1), - // selected, - // ) - // } - for (i, _) in (scroll..(scroll + win_height).min(len)).enumerate() { let is_marked = i >= scroll_line && i < scroll_line + scroll_height; -- cgit v1.2.3-70-g09d2