diff options
author | tv <tv@krebsco.de> | 2019-01-25 14:20:36 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2019-01-25 14:20:36 +0100 |
commit | 8fc4fbb5bb7781626da8f63cd8df8bb0f554cfe7 (patch) | |
tree | b7c327fbe93fb92b1ff62296dea4ae96e26633f7 | |
parent | 19015f22e9f5470bb21b244d9ac3e0eb7a7bd5da (diff) |
use blessings 2v1.2.0
-rw-r--r-- | much.cabal | 6 | ||||
-rw-r--r-- | test5.hs | 7 |
2 files changed, 7 insertions, 6 deletions
@@ -1,8 +1,8 @@ name: much -version: 1.1.0 +version: 1.2.0 license: MIT -author: tv <tv@shackspace.de> -maintainer: tv@shackspace.de +author: tv <tv@krebsco.de> +maintainer: tv@krebsco.de build-type: Simple cabal-version: >=1.10 @@ -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 |