diff --git a/brick.cabal b/brick.cabal index d7f341a..d89293f 100644 --- a/brick.cabal +++ b/brick.cabal @@ -123,7 +123,6 @@ library bimap >= 0.5 && < 0.6, data-clist >= 0.1, directory >= 1.2.5.0, - dlist, exceptions >= 0.10.0, filepath, containers >= 0.5.7, diff --git a/src/Brick/Widgets/Core.hs b/src/Brick/Widgets/Core.hs index 68a1c74..2c16ace 100644 --- a/src/Brick/Widgets/Core.hs +++ b/src/Brick/Widgets/Core.hs @@ -126,7 +126,6 @@ import Control.Monad.State.Strict import Control.Monad.Reader import qualified Data.Foldable as F import qualified Data.Text as T -import qualified Data.DList as DL import qualified Data.Map as M import qualified Data.Set as S import qualified Data.IMap as I @@ -642,15 +641,15 @@ renderBox br ws = let availPrimary = c^.(contextPrimary br) availSecondary = c^.(contextSecondary br) - renderHis _ prev [] = return $ DL.toList prev - renderHis remainingPrimary prev ((i, prim):rest) = do + renderHis _ [] = pure [] + renderHis remainingPrimary ((i, prim):rest) = do result <- render $ limitPrimary br remainingPrimary $ limitSecondary br availSecondary $ cropToContext prim - renderHis (remainingPrimary - (result^.imageL.(to $ imagePrimary br))) - (DL.snoc prev (i, result)) rest + let newRem = remainingPrimary - (result^.imageL.(to $ imagePrimary br)) + ((i, result) :) <$> renderHis newRem rest - renderedHis <- renderHis availPrimary DL.empty his + renderedHis <- renderHis availPrimary his renderedLows <- case lows of [] -> return []