From 8bf82a9b585f93b1332bc4ae57aad0623e93bb4a Mon Sep 17 00:00:00 2001 From: Nils Berg Date: Thu, 1 Mar 2018 21:13:15 +0100 Subject: [PATCH] make SelectView less greedy --- src/views/select_view.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/select_view.rs b/src/views/select_view.rs index d6ce2f3..0c0756a 100644 --- a/src/views/select_view.rs +++ b/src/views/select_view.rs @@ -677,7 +677,9 @@ impl View for SelectView { // Add 2 spaces for the scrollbar if we need let w = if scrolling { w + 2 } else { w }; - Vec2::new(w, h) + // Don't request more than we're offered - we can scroll, + // after all + Vec2::new(w, min(h, req.y)) } }