Description of problem: When TERM=screen, behavior of reverse color, an effect widely used by terminal utilities, is broken. Effect shows as italic, not reverse video. Version-Release number of selected component (if applicable): ncurses-base-5.9-18.20150214.fc22.noarch How reproducible: Always. Steps to Reproduce: 1. man man 2. 3. Actual results: Reverse video characters show as italic, not reverse color. Expected results: Reverse color. Additional info: I see this in the ncurses documentation: 20140614 + fix dereference before null check found by Coverity in tic.c (cf: 20140524). + fix sign-extension bug in read_entry.c which prevented "toe" from reading empty "screen+italics" entry. + modify sgr for screen.xterm-new to support dim capability -TD + add dim capability to nsterm+7 -TD + cancel dim capability for iterm -TD + add dim, invis capabilities to vte-2012 -TD + add sitm/ritm to konsole-base and mlterm3 -TD 20140609 > fix regression in screen terminfo entries (reports by Christian Ebert, Gabriele Balducci) -TD + revert the change to screen; see notes for why this did not work -TD + cancel sitm/ritm for entries which extend "screen", to work around screen's hardcoded behavior for SGR 3 -TD I think, judging from the rpm changelog, these updates were pulled into Fedora pkg *after* F21 rebuild and, therefore, showed up first in F22. So, the timing fits, I think.
I know this isn't really very severe, but it's driving me bonkers because I use "less" *all the time*, and now I can't see what I'm searching for, because my terminal doesn't *do* italics, so searches are totally invisible. ;_;
To clarify: I am having this issue with screen-265color, as well. Also, setting TERM=xterm fixes it, but tmux says you're not supposed to do that.
See bug 1245426 for more info and workarounds. You can't use xterm terminfo with TMUX and ncurses applications; moving the cursor around just messes everything up. I use alpine, finch, wyrd, and irssi every day and three of them break with TERM=xterm* . (Yes, I agree, 'bonkers' is exactly right!)
To explain the specific problem: less, and presumably other programs, use smso (set stand-out mode) to hilight things, which generally ends up being reverse video. The screen-256color terminfo says that smso is SGR 3, which screen does interpret as reverse video, replacing it with the outer terminal’s reverse video code. In xterm-256color, reverse video is SGR 7. tmux (at least in the current F22 version) does not duplicate screen’s interpretation, and instead passes SGR 3 through unmodified, which other terminals then interpret as sitm (set italics mode) in accordance with the xterm-256color terminfo. The bug linked in comment #3 indicates that the use of SGR 3 is a change to the screen-256color terminfo, but the corresponding compatibility fix to tmux was not incorporated in F22.
So the problem only shows up with tmux, which doesn't perfectly emulate screen? In upstream ncurses there was a tmux terminfo entry recently included, that would probably be the best place to fix these issues. It will take some time before it's included in all major distributions, but tmux could then use its own entry and won't have to emulate all quirks of screen.
FWIW, the tmux terminfo is included in the latest rawhide ncurses.
It seems this was already fixed in tmux, so I'm closing this as a duplicate of the tmux bug. *** This bug has been marked as a duplicate of bug 1245426 ***