@@ -92,10 +92,11 @@ sendCapToTerminal t cap capParams = do
93{- | Uses terminfo for all control codes. While this should provide the most compatible terminal
93{- | Uses terminfo for all control codes. While this should provide the most compatible terminal
94 - terminfo does not support some features that would increase efficiency and improve compatibility:
94 - terminfo does not support some features that would increase efficiency and improve compatibility:
95 - * determine the character encoding supported by the terminal. Should this be taken from the LANG
96 - * determine the character encoding supported by the terminal. Should this be taken from the LANG
96 - environment variable?
97 - environment variable?
97− - * Provide independent string capabilities for all display attributes.
99+ - * Provide independent string capabilities for all display attributes.
100 - todo: Some display attributes like underline and bold have independent string capabilities that
101 - todo: Some display attributes like underline and bold have independent string capabilities that
101 - should be used instead of the generic "sgr" string capability.
102 - should be used instead of the generic "sgr" string capability.
@@ -238,15 +239,21 @@ terminfoDisplayContext tActual terminfoCaps r = return dc
238-- directly ; and, for no good reason, resets the colors to the default) this procedure is used:
239-- directly ; and, for no good reason, resets the colors to the default) this procedure is used:
240-- 0. set the style attributes. This resets the fore and back color.
241-- 0. set the style attributes. This resets the fore and back color.
241-- 1, If a foreground color is to be set then set the foreground color
243-- 1, If a foreground color is to be set then set the foreground color
242-- 2. likewise with the background color
245-- 2. likewise with the background color
244-- If the terminal does not support the sgr cap then:
247-- If the terminal does not support the sgr cap then:
245-- if there is a change from an applied color to the default (in either the fore or back color)
248-- if there is a change from an applied color to the default (in either the fore or back color)
247-- 0. reset all display attributes (sgr0)
251-- 0. reset all display attributes (sgr0)
248-- 1. enter required style modes
253-- 1. enter required style modes
249-- 2. set the fore color if required
255-- 2. set the fore color if required
250-- 3. set the back color if required
257-- 3. set the back color if required
252-- Entering the required style modes could require a reset of the display attributes. If this is
259-- Entering the required style modes could require a reset of the display attributes. If this is