summaryrefslogtreecommitdiffstats
path: root/test5.hs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-01-25 14:20:36 +0100
committertv <tv@krebsco.de>2019-01-25 14:20:36 +0100
commit8fc4fbb5bb7781626da8f63cd8df8bb0f554cfe7 (patch)
treeb7c327fbe93fb92b1ff62296dea4ae96e26633f7 /test5.hs
parent19015f22e9f5470bb21b244d9ac3e0eb7a7bd5da (diff)
use blessings 2v1.2.0
Diffstat (limited to 'test5.hs')
-rw-r--r--test5.hs7
1 files changed, 4 insertions, 3 deletions
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