I am writing a plugin and need to check if a highlight attribute (bold, italic, underline and so on) is actually displayable on a terminal. I tried to check it with termcap. For example of the underline,
!empty(&t_us) && !empty(&t_ue)
becomes TRUE on xterm, and displayable.
However,
becomes TRUE on win32, but not displayable.
becomes FALSE on nvim, but displayable.
Could someone have a good idea to check it correctly?