diff options
author | tv <tv@shackspace.de> | 2015-01-01 23:53:30 +0100 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-01-01 23:53:30 +0100 |
commit | 5d556b147a593f1b8c8127883055ad07ee347af9 (patch) | |
tree | 6697766faff1510492cb1c7f38c8fc1790838add /TreeViewRaw.hs | |
parent | 67aa6764bfafabda51eb270e01aaf0fc638f380f (diff) |
colorize quoted lines
Diffstat (limited to 'TreeViewRaw.hs')
-rw-r--r-- | TreeViewRaw.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/TreeViewRaw.hs b/TreeViewRaw.hs index ee3bd99..0ec747b 100644 --- a/TreeViewRaw.hs +++ b/TreeViewRaw.hs @@ -51,6 +51,7 @@ renderTreeView now cur _loc@(Node label children) = searchSGR , focusSGR + , quoteSGR , boringSGR , dateSGR , tagsSGR @@ -61,6 +62,7 @@ searchSGR :: Trammel String -> Trammel String searchSGR = SGR [38,5,162] focusSGR = SGR [38,5,160] +quoteSGR = SGR [38,5,242] boringSGR = SGR [38,5,240] dateSGR = SGR [38,5,071] tagsSGR = SGR [38,5,036] @@ -114,6 +116,11 @@ renderTreeView1 now hasFocus x = case x of charset = maybe "" (Plain . (" "<>) . show) $ Notmuch.partContentCharset p in c $ "part#" <> i <> " " <> t <> filename <> charset + TVMessageQuoteLine _ _ _ s -> + if hasFocus + then focusSGR $ Plain s + else quoteSGR $ Plain s + TVMessageLine _ _ _ s -> if hasFocus then focusSGR $ Plain s |