pub fn sgr_flags_off<W: Write>(
w: &mut W,
flags_to_disable: StyleFlags,
flags_to_keep: StyleFlags,
) -> Result<StyleFlags>Expand description
Write SGR sequence to turn off specific style flags.
Emits the individual “off” codes for each flag in flags_to_disable.
Handles the Bold/Dim shared off code (22): if only one of Bold/Dim needs
to be disabled while the other must stay on, the caller must re-enable
the survivor separately. This function returns the set of flags that were
collaterally disabled (i.e., flags that share an off code with a disabled flag
but should remain enabled according to flags_to_keep).
Returns the set of flags that need to be re-enabled due to shared off codes.