on master help sign in
withStyle: leave style untouched if added style is zero
b9572e6Jonathan Daugherty
src/Graphics/Vty/Attributes.hs+1
@@ -200,6 +200,7 @@ withBackColor attr c = attr { attrBackColor = SetTo c }
200
200
201-- | Add the given style attribute
201-- | Add the given style attribute
202withStyle :: Attr -> Style -> Attr
202withStyle :: Attr -> Style -> Attr
203+withStyle attr 0 = attr
203withStyle attr styleFlag = attr { attrStyle = SetTo $ styleMask attr .|. styleFlag }
204withStyle attr styleFlag = attr { attrStyle = SetTo $ styleMask attr .|. styleFlag }
204
205
205-- | Sets the style, background color and foreground color to the
206-- | Sets the style, background color and foreground color to the