on master help sign in
minor layout fixes
3d32645Colby Jenn
src/Graphics/Vty/Output/TerminfoBased.hs+6−6
@@ -120,12 +120,12 @@ reserveTerminal termName outFd = do
120 Nothing -> (True, True, error $ "no fore color support for terminal " ++ termName)
120 Nothing -> (True, True, error $ "no fore color support for terminal " ++ termName)
121 msetab <- probeCap ti "setab"
121 msetab <- probeCap ti "setab"
122 msetb <- probeCap ti "setb"
122 msetb <- probeCap ti "setb"
123− let set_back_cap
123+ let setBackCap
124 = case msetab of
124 = case msetab of
125+ Just setab -> setab
125 Nothing -> case msetb of
126 Nothing -> case msetb of
126 Just setb -> setb
127 Just setb -> setb
127 Nothing -> error $ "no back color support for terminal " ++ termName
128 Nothing -> error $ "no back color support for terminal " ++ termName
128− Just setab -> setab
129
129
130 hyperlinkModeStatus <- newIORef False
130 hyperlinkModeStatus <- newIORef False
131 newAssumedStateRef <- newIORef initialAssumedState
131 newAssumedStateRef <- newIORef initialAssumedState
@@ -154,7 +154,7 @@ reserveTerminal termName outFd = do
154 <*> pure noColors
154 <*> pure noColors
155 <*> pure useAlt
155 <*> pure useAlt
156 <*> pure setForeCap
156 <*> pure setForeCap
157− <*> pure set_back_cap
157+ <*> pure setBackCap
158 <*> requireCap ti "sgr0"
158 <*> requireCap ti "sgr0"
159 <*> requireCap ti "clear"
159 <*> requireCap ti "clear"
160 <*> requireCap ti "el"
160 <*> requireCap ti "el"
@@ -302,7 +302,7 @@ writeURLEscapes NoLinkChange =
302-- | Portably setting the display attributes is a giant pain in the ass.
302-- | Portably setting the display attributes is a giant pain in the ass.
303--
303--
304-- If the terminal supports the sgr capability (which sets the on/off
304-- 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
306-- colors to the default) this procedure is used:
306-- colors to the default) this procedure is used:
307--
307--
308-- 0. set the style attributes. This resets the fore and back color.
308-- 0. set the style attributes. This resets the fore and back color.
@@ -341,9 +341,9 @@ terminfoWriteSetAttr dc terminfoCaps urlsEnabled prevAttr reqAttr diffs =
341 -- The only way to reset either color, portably, to the default
341 -- The only way to reset either color, portably, to the default
342 -- is to use either the set state capability or the set default
342 -- is to use either the set state capability or the set default
343 -- capability.
343 -- capability.
344− True -> do
344+ True -> do
345 case reqDisplayCapSeqFor (displayAttrCaps terminfoCaps)
345 case reqDisplayCapSeqFor (displayAttrCaps terminfoCaps)
346− (fixedStyle attr )
346+ (fixedStyle attr)
347 (styleToApplySeq $ fixedStyle attr) of
347 (styleToApplySeq $ fixedStyle attr) of
348 -- only way to reset a color to the defaults
348 -- only way to reset a color to the defaults
349 EnterExitSeq caps -> writeDefaultAttr dc urlsEnabled
349 EnterExitSeq caps -> writeDefaultAttr dc urlsEnabled