#195 improve 256 color support

open
nobody
5
2007-04-24
2007-04-24
Egmont Koblinger
No

Currently joe supports 256 colors, but the corresponding escape sequences are hard-coded in the source, and if I specify e.g. fg_012 in a .jsf file, joe will always output its corresponding escape sequence, which may work in some terminals but may not work in others.

Whether the terminal supports up to 88 or 256 colors is available in the terminfo entry "colors#", so as the escape sequence to change to these colors (setab, setaf, setb, setf).

It would be nice if joe autodetected whether 256 colors are supported, and it was possible to specify colors for both scenarios. This way I could use lots of beautiful colors when I use a 256-color terminal, but still joe would work correctly on an old-fashioned terminal and use its 16 colors properly.

Discussion