Core.hyperlink: use attrL rather than duplicating context attribute lookup

This commit is contained in:
Jonathan Daugherty 2022-01-31 16:29:56 -08:00
parent c1bce6a434
commit 4ad3ffb5a2

View File

@ -373,7 +373,7 @@ hyperlink :: T.Text -> Widget n -> Widget n
hyperlink url p =
Widget (hSize p) (vSize p) $ do
c <- getContext
let attr = attrMapLookup (c^.ctxAttrNameL) (c^.ctxAttrMapL) `V.withURL` url
let attr = c^.attrL `V.withURL` url
withReaderT (ctxAttrMapL %~ setDefaultAttr attr) (render p)
-- | Pad the specified widget on the left. If max padding is used, this