Scroll so focused element is always visible

This commit is contained in:
Joscha 2020-02-11 12:14:51 +00:00
parent 9f507b5b9e
commit 70bbc3a69a
3 changed files with 4 additions and 3 deletions

View file

@ -134,9 +134,10 @@ onKeyWithEditor ed cs ev = updateEditor ed cs ev
{- And the rest of the Brick application -}
clientDraw :: ClientState -> [Widget ResourceName]
clientDraw cs = [padTop (Pad 1) $ padLeft (Pad 2) tree]
clientDraw cs = [padTop (Pad 1) $ padLeft (Pad 2) vp]
where
tree = renderTree boxDrawingBranching (csEditor cs) (csTree cs)
vp = viewport RnViewport Vertical tree
clientHandleEvent
:: ClientState