on master help sign in
Fix scrollbar length proportional to total menu items (#2860)
301065fGokul Soumya
helix-term/src/ui/menu.rs+1−1
@@ -288,7 +288,7 @@ impl<T: Item + 'static> Component for Menu<T> {
288 let win_height = area.height as usize;
288 let win_height = area.height as usize;
289
289
290 const fn div_ceil(a: usize, b: usize) -> usize {
290 const fn div_ceil(a: usize, b: usize) -> usize {
291− (a + b - 1) / a
291+ (a + b - 1) / b
292 }
292 }
293
293
294 let scroll_height = std::cmp::min(div_ceil(win_height.pow(2), len), win_height as usize);
294 let scroll_height = std::cmp::min(div_ceil(win_height.pow(2), len), win_height as usize);