From d58f1e4fef48c7170f82a24c6eb5e5fcc1ee4f8d Mon Sep 17 00:00:00 2001 From: Joscha Date: Fri, 28 Feb 2020 19:35:42 +0000 Subject: [PATCH] [client] Fix rendering of nodes containing empty strings --- src/Forest/Client/UiState.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Forest/Client/UiState.hs b/src/Forest/Client/UiState.hs index 29f2b23..000f846 100644 --- a/src/Forest/Client/UiState.hs +++ b/src/Forest/Client/UiState.hs @@ -268,7 +268,11 @@ renderNode focused node = decorateFlags (nodeFlags node) $ decorateFocus focused $ decorateExpand (not $ OMap.null $ nodeChildren node) $ - padRight Max $ txtWrap $ nodeText node + padRight Max $ txtWrap text + where + text + | T.null $ nodeText node = " " + | otherwise = nodeText node nodeToTree :: (Ord n, Show n) => UiState n -> Path -> Node -> Maybe [WidgetTree n] -> WidgetTree n nodeToTree s path node maybeChildren = case uiEditor s of