on master help sign in
minor layout fixes
commit3d32645d739377950373922adbb36e8798d2265c authorColby Jenn <colbymjenn@gmail.com> dateMon 3 Jun 2019, 14:27 (7 years ago) parenta9e45da
1 file changed+6−6
src/Graphics/Vty/Output/TerminfoBased.hs+6−6
src/Graphics/Vty/Output/TerminfoBased.hs+6−6
@@ -120,12 +120,12 @@ reserveTerminal termName outFd = do
120120 Nothing -> (True, True, error $ "no fore color support for terminal " ++ termName)
121121 msetab <- probeCap ti "setab"
122122 msetb <- probeCap ti "setb"
123− let set_back_cap
123+ let setBackCap
124124 = case msetab of
125+ Just setab -> setab
125126 Nothing -> case msetb of
126127 Just setb -> setb
127128 Nothing -> error $ "no back color support for terminal " ++ termName
128− Just setab -> setab
129129
130130 hyperlinkModeStatus <- newIORef False
131131 newAssumedStateRef <- newIORef initialAssumedState
@@ -154,7 +154,7 @@ reserveTerminal termName outFd = do
154154 <*> pure noColors
155155 <*> pure useAlt
156156 <*> pure setForeCap
157− <*> pure set_back_cap
157+ <*> pure setBackCap
158158 <*> requireCap ti "sgr0"
159159 <*> requireCap ti "clear"
160160 <*> requireCap ti "el"
@@ -302,7 +302,7 @@ writeURLEscapes NoLinkChange =
302302-- | Portably setting the display attributes is a giant pain in the ass.
303303--
304304-- If the terminal supports the sgr capability (which sets the on/off
305−-- state of each style directly ; and, for no good reason, resets the
305+-- state of each style directly; and, for no good reason, resets the
306306-- colors to the default) this procedure is used:
307307--
308308-- 0. set the style attributes. This resets the fore and back color.
@@ -341,9 +341,9 @@ terminfoWriteSetAttr dc terminfoCaps urlsEnabled prevAttr reqAttr diffs =
341341 -- The only way to reset either color, portably, to the default
342342 -- is to use either the set state capability or the set default
343343 -- capability.
344− True -> do
344+ True -> do
345345 case reqDisplayCapSeqFor (displayAttrCaps terminfoCaps)
346− (fixedStyle attr )
346+ (fixedStyle attr)
347347 (styleToApplySeq $ fixedStyle attr) of
348348 -- only way to reset a color to the defaults
349349 EnterExitSeq caps -> writeDefaultAttr dc urlsEnabled