Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
win: Emulate reverse, secure, and standout
* As cmr's comment says, COMMON_LVB_REVERSE_VIDEO and COMMON_LVB_UNDERSCORE are not usable. There is a mode flag (ENABLE_LVB_GRID_WORLDWIDE) that is supposed to make them work, but: 1. COMMON_LVB_REVERSE_VIDEO works on Windows 10 regardless of whether this flag is set. 2. I couldn't get COMMON_LVB_UNDERSCORE to work no matter what. Maybe it's this bug (microsoft/terminal#47). Maybe not, I don't know. 3. Since setting ENABLE_LVB_GRID_WORLDWIDE fails on older Windows versions (tested on Windows 7), and since Windows 10 has the flag ENABLE_VIRTUAL_TERMINAL_PROCESSING which enables xterm-level ANSI compatibility. This whole exercise is pointless. * This commit adds simple emulations for three attributes: 1. Reverse: simply reverse fg and bg. 2. Secure: set fg = bg. 3. Standout: set BACKGROUND_INTENSITY. This should improve the situation slightly on older versions of Windows. For Windows 10, we should take advantage of ENABLE_VIRTUAL_TERMINAL_PROCESSING. One approach of doing so will be shared in a following commit/PR. Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
- Loading branch information