Prevent unfolding of nodes without children

This commit is contained in:
Joscha 2020-02-09 11:44:25 +00:00
parent 909d587c53
commit 573a835022
4 changed files with 20 additions and 8 deletions

View file

@ -51,7 +51,11 @@ newClientState node = ClientState
}
clientDraw :: ClientState -> [Widget ResourceName]
clientDraw cs = [renderTree boxDrawingBranching (csEditor cs) (csTree cs)]
clientDraw cs =
[ renderTree boxDrawingBranching (csEditor cs) (csTree cs) <=>
txt "--------------------------------------------------------------------------------" <=>
txtWrap (T.pack $ show $ csTree cs)
]
isQuitEvent :: BrickEvent a b -> Bool
isQuitEvent (VtyEvent (Vty.EvKey (Vty.KChar 'q') [])) = True