Scrollbars make the listing smaller sometimes.

This commit is contained in:
Andrew Hamilton 2016-01-31 09:22:11 +00:00
parent d769fa6971
commit c18fc4e8bf

2
vigil
View file

@ -696,6 +696,8 @@ class Screen:
selected_widget.result.appearance_min())
listing_width, listing_height = (self._listing.widget.
last_dimensions)
listing_width -= 1 # scrollbars
listing_height -= 1
x = min(x + dx, max(widget_width - listing_width, 0))
y = min(y + dy, max(widget_height - listing_height, 0))
selected_widget.scroll_position = x, y