If a termcap entry for ending attributes and color also contains the code to switch from secondary font back to primary (HE_resets_AS hack), maybe strip the AS code out of HE (and clear the HE_resets_AS flag) when setting up DECgraphics. Affects whether nethack sends extra AS sequences while rendering a run of VT line-drawing chars. My HE doesn't reset AS so that aspect hasn't been exercized. When switching back and forth between normal and line-drawing, defer the switch away from line-drawing if the character will be rendered the same in both character sets (uppercase letter, digit, most punctuation). That might just defer the AE, but could skip it and next AS depending on what characters are written. The cycle might repeat an arbitrary number of times, avoiding sending many AS+AE combinations rather than just one. Both of these optimizations are pretty small but reducing the number of characters sent from a server to a remote user is worthwhile.
175 KiB
175 KiB