From 8fc4fbb5bb7781626da8f63cd8df8bb0f554cfe7 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 25 Jan 2019 14:20:36 +0100 Subject: use blessings 2 --- much.cabal | 6 +++--- test5.hs | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/much.cabal b/much.cabal index a436778..be63cb1 100644 --- a/much.cabal +++ b/much.cabal @@ -1,8 +1,8 @@ name: much -version: 1.1.0 +version: 1.2.0 license: MIT -author: tv -maintainer: tv@shackspace.de +author: tv +maintainer: tv@krebsco.de build-type: Simple cabal-version: >=1.10 diff --git a/test5.hs b/test5.hs index c667336..aa61776 100644 --- a/test5.hs +++ b/test5.hs @@ -17,7 +17,8 @@ import qualified Notmuch import qualified Notmuch.Message as Notmuch import qualified Notmuch.SearchResult as Notmuch import qualified System.Console.Terminal.Size as Term -import Blessings +import Blessings.String (Blessings(Plain,SGR),pp) +import qualified Blessings.Internal as Blessings import Control.Concurrent import Control.Exception import Control.Monad @@ -235,7 +236,7 @@ render q@State{..} = render0 :: State -> [Blessings String] render0 _q@State{..} = do let buffer = - map (blessingsTake screenWidth . blessingsDrop xoffset) $ + map (Blessings.take screenWidth . Blessings.drop xoffset) $ take screenHeight $ headBuffer ++ drop yoffset treeBuffer buffer ++ take (screenHeight - length buffer) (repeat "~") @@ -248,7 +249,7 @@ redraw q@State{..} = do where sub x x' c = if c == x then x' else c eraseRight s = - if len s < screenWidth + if Blessings.length s < screenWidth then s <> "\ESC[K" else s -- cgit v1.2.3