aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/menu.rs
diff options
context:
space:
mode:
authorGokul Soumya2021-08-21 05:21:20 +0000
committerGitHub2021-08-21 05:21:20 +0000
commitf9375f449c8b7bbf792c88b89903fe38d524f2e5 (patch)
tree71a2313a7a7cebc071dffd9e3423f407eb4192e0 /helix-term/src/ui/menu.rs
parentac8bc541087f815a026b4c664c069d8806b9c5de (diff)
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
Diffstat (limited to 'helix-term/src/ui/menu.rs')
-rw-r--r--helix-term/src/ui/menu.rs8
1 files changed, 0 insertions, 8 deletions
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<T: Item + 'static> Component for Menu<T> {
},
);
- // // 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;