Follow-up Comment #1, bug #66385 (group screen): FWIW, my understanding of this issue has to do with how screen responds to the "\E]3m" and "\E]23m" escape sequences and what the screen terminfo entry has for the enter_standout_mode and exit_standout_mode entries (in my case the terminfo entry is actually screen-256color).
On an older system, I have:
$ screen --version
Screen version 4.09.01 (GNU) 20-Aug-23
$ TERMINFO=/usr/share/terminfo TERM=screen-256color infocmp -L1 | grep -E
'enter_(italics|standout|reverse)_mode'
enter_reverse_mode=\E[7m,
enter_standout_mode=\E[3m,
And, if I then enter screen and run (see terminfo(5) for the long name to
short name mappings):
$ tput smso; echo test; tput rmso
It displays "test" in reverse video, as expected.
On a newer system, I have:
$ screen --version
Screen version 5.0.1 (build on 2026-01-05 00:01:00)
$ TERMINFO=/usr/share/terminfo TERM=screen-256color infocmp -L1 | grep -E
'enter_(italics|standout|reverse)_mode'
enter_reverse_mode=\E[7m,
enter_standout_mode=\E[3m,
And, if I then enter screen and run:
$ tput smso; echo test; tput rmso
It displays "test" in italics.
When viewing a man page, many people use less as the pager, and less asks the
terminal to highlight the search terms and the line at the bottom using
"standout_mode".
My understanding is that screen 4 used to treat "\E]3m" as the same as
enter_reverse_mode, but now screen 5 treats it the same as enter_italics_mode
(which, I believe is more correct, as that is what e.g. "alacritty" does with
that escape sequence).
But, the terminfo entries for enter_standout_mode and exit_standout_mode were
not updated to use "\E[7m" and "\E[27m" instead of "\E[3m" and "\E[23m".
Hence it was the case for me (and, I'm guessing for the OP), that screen was
attempting to display the last line in italics, but it's possible their font
didn't allow that to show up properly.
I've worked around this issue by simply taking the screen-256color terminfo
entry, updating the enter_standout_mode and exit_standout_mode entries,
recompiling and stashing it in my home directory, like so:
$ mkdir /tmp/terminfo && \
tic -o /tmp/terminfo \
<(TERMINFO=/usr/share/terminfo \
TERM=screen-256color \
infocmp -L1 \
| sed \
-e '/enter_standout_mode/s/=.*$/=\\E[7m,/' \
-e '/exit_standout_mode/s/=.*$/=\\E[27m,/') && \
cp /tmp/terminfo/s/screen-256color ~/.terminfo/s/screen-256color
Now running "man ls" in screen 5 uses reverse video, as I'd expect.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66385>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
