packages feed

vty 5.23 → 5.23.1

raw patch · 4 files changed

+21/−8 lines, 4 filesdep ~base

Dependency ranges changed: base

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+5.23.1+  - Fixed a bug where italics did not combine properly with other+    display modes (#155, thanks Eric Mertens)+ 5.23   - Added support for italicized output when terminfo supports it. This     takes the form of a new Style, "italic". Note that most terminfo
src/Graphics/Vty/Attributes.hs view
@@ -175,7 +175,7 @@ -- if the style attribute should not be applied. type Style = Word8 --- | The 6 possible style attributes:+-- | The 7 possible style attributes: -- --      * standout --@@ -196,7 +196,7 @@ standout, underline, reverseVideo, blink, dim, bold, italic :: Style standout        = 0x01 underline       = 0x02-reverseVideo   = 0x04+reverseVideo    = 0x04 blink           = 0x08 dim             = 0x10 bold            = 0x20
src/Graphics/Vty/Output/TerminfoBased.hs view
@@ -315,7 +315,7 @@ -- Note that this optimizes for fewer state changes followed by fewer -- bytes. terminfoWriteSetAttr :: DisplayContext -> TerminfoCaps -> Bool -> FixedAttr -> Attr -> DisplayAttrDiff -> Write-terminfoWriteSetAttr dc terminfoCaps urlsEnabled prevAttr reqAttr diffs = do+terminfoWriteSetAttr dc terminfoCaps urlsEnabled prevAttr reqAttr diffs =     urlAttrs urlsEnabled `mappend` case (foreColorDiff diffs == ColorToDefault) || (backColorDiff diffs == ColorToDefault) of         -- The only way to reset either color, portably, to the default         -- is to use either the set state capability or the set default@@ -336,8 +336,8 @@                                                          $ terminfoCaps                                                )                                                (sgrArgsForState state)-                                  `mappend`-                                  setColors+                                  `mappend` setItalics+                                  `mappend` setColors         -- Otherwise the display colors are not changing or changing         -- between two non-default points.         False -> do@@ -363,6 +363,7 @@                                                          $ displayAttrCaps terminfoCaps                                                )                                                (sgrArgsForState state)+                                  `mappend` setItalics                                   `mappend` setColors     where         urlAttrs True = writeURLEscapes (urlDiff diffs)@@ -371,6 +372,15 @@                         False -> ansiColorIndex                         True -> altColorIndex         attr = fixDisplayAttr prevAttr reqAttr++        -- italics can't be set via SGR, so here we manually+        -- apply the enter and exit sequences as needed after+        -- changing the SGR+        setItalics+          | hasStyle (fixedStyle attr) italic+          , Just sitm <- enterItalic (displayAttrCaps terminfoCaps)+          = writeCapExpr sitm []+          | otherwise = mempty         setColors =             (case fixedForeColor attr of                 Just c -> writeCapExpr (setForeColor terminfoCaps)@@ -449,7 +459,6 @@ sgrArgsForState attrState = map (\b -> if b then 1 else 0)     [ applyStandout attrState     , applyUnderline attrState-    , applyItalic attrState     , applyReverseVideo attrState     , applyBlink attrState     , applyDim attrState@@ -521,7 +530,7 @@     , applyIfRequired ApplyReverseVideo reverseVideo     , applyIfRequired ApplyBlink blink     , applyIfRequired ApplyDim dim-    , applyIfRequired ApplyBlink bold+    , applyIfRequired ApplyBold bold     ]     where         applyIfRequired op flag
vty.cabal view
@@ -1,5 +1,5 @@ name:                vty-version:             5.23+version:             5.23.1 license:             BSD3 license-file:        LICENSE author:              AUTHORS