Fix a bug where a viewport forgot to preserve visibility requests and cursor locations when its rendering turned up empty

This commit is contained in:
Jonathan Daugherty 2015-07-03 14:04:49 -07:00
parent 41a365daa1
commit aec98739b6

View File

@ -495,8 +495,10 @@ viewport vpname typ p =
, translated^.image.to V.imageHeight
)
case translatedSize of
(0, 0) -> render $ fill ' '
_ -> render $ cropToContext $ padBottom
(0, 0) -> return $ translated & image .~ (V.charFill (c^.attr) ' ' (c^.availW) (c^.availH))
& visibilityRequests .~ mempty
_ -> render $ cropToContext
$ padBottom
$ padRight
$ Widget Fixed Fixed $ return $ translated & visibilityRequests .~ mempty