[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wrong foreground colors with TERM=linux-16color using ncurses
From: |
Dino Petrucci |
Subject: |
Wrong foreground colors with TERM=linux-16color using ncurses |
Date: |
Fri, 25 Oct 2019 21:30:55 +0200 |
User-agent: |
Mutt/1.12.2 (2019-09-21) |
There is a problem with colors in the Linux console by defining
TERM="linux-16color" with the actual terminfo database (rev. 1.742).
Vim, GNU Emacs, and other programs that use ncurses with foreground
colors from 0 to 7 display just one color. Attachments show three cases
(I ran 'M-x list-colors-display' within 'emacs -q'):
linux.png [all right]
$ export TERM="linux"
linux16_21.png [wrong]
$ export TERM="linux-16color"
The problem could be solved by changing the string definition (see
'terminfo.src' rev. 1.742 at line 1134) from
setaf=\E[3%p1%{8}%m%d%?%p1%{7}%>%t;1%e;21%;m
to
setaf=\E[3%p1%{8}%m%d%?%p1%{7}%>%t;1%e;22%;m
that is by replacing 21 with 22 in the 'else' statement. See the third
attachment which shows the correct result, after compiling the database
with the string 'setaf' changed:
linux16_22.png [correct]
$ export TERM="linux-16color"
'man 4 console_codes', section 'ECMA-48 Set Graphics Rendition', reports
that parameter 21 'set normal intensity (ECMA-48 says "doubly
underlined")'; I think ncurses considers 21 as "doubly underlined"
somewhere. Instead the parameter 22 gives the correct result without
any ambiguity.
Best regards,
Dino Petrucci
linux.png
Description: PNG image
linux16_21.png
Description: PNG image
linux16_22.png
Description: PNG image
- Wrong foreground colors with TERM=linux-16color using ncurses,
Dino Petrucci <=