diff options
Diffstat (limited to 'lib/Daffm/View.hs')
| -rw-r--r-- | lib/Daffm/View.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Daffm/View.hs b/lib/Daffm/View.hs index da6a11b..0846f66 100644 --- a/lib/Daffm/View.hs +++ b/lib/Daffm/View.hs @@ -18,9 +18,10 @@ import Text.Printf (printf) appView :: AppState -> [Widget FocusTarget] appView appState@(AppState {stateFiles}) = [ui] where - ui = vBox [vLimit 1 header, box, vLimit 1 cmdline] + ui = vBox [vLimit 1 header, box, message, vLimit 1 cmdline] header = headerView appState cmdline = cmdlineView appState + message = messageView appState box = L.renderListWithIndex (fileItemView appState) True stateFiles hFixed :: Int -> Widget n -> Widget n @@ -101,6 +102,10 @@ symTargetView _ Nothing = withAttr invalidLinkAttr $ txt "<none>" symTargetView Nothing (Just target) = withAttr invalidLinkAttr $ txt target symTargetView _ (Just target) = txt target +messageView :: AppState -> Widget FocusTarget +messageView (AppState {stateMessage = Just message}) = txt message +messageView _ = emptyWidget + cmdlineView :: AppState -> Widget FocusTarget cmdlineView (AppState {stateFocusTarget = FocusCmdline, stateCmdlineEditor}) = txt ":" <+> renderEditor (txt . Text.unlines) True stateCmdlineEditor |
