Tiago Resende wrote:

> It is already configurable through terminfo. If you want italics and
> standout to work properly, use what's in the FAQ [1]:
> 
> ] To make applications aware that tmux supports italics and to use a proper
> ] escape sequence for standout, you'll need to create a new terminfo file with
> ] modified sgr, smso, rmso, sitm and ritm entries:
> ]
> ]       $ mkdir $HOME/.terminfo/
> ]       $ screen_terminfo="screen"
> ]       $ infocmp "$screen_terminfo" | sed \
> ]         -e 's/^screen[^|]*|[^,]*,/screen-it|screen with italics support,/' \
> ]         -e 's/%?%p1%t;3%/%?%p1%t;7%/' \
> ]         -e 's/smso=[^,]*,/smso=\\E[7m,/' \
> ]         -e 's/rmso=[^,]*,/rmso=\\E[27m,/' \
> ]         -e '$s/$/ sitm=\\E[3m, ritm=\\E[23m,/' > /tmp/screen.terminfo
> ]       $ tic /tmp/screen.terminfo
> ]
> ] And tell tmux to use it in ~/.tmux.conf:
> ]       
> ]       set -g default-terminal "screen-it"
> 
> [1]: http://tmux.svn.sourceforge.net/viewvc/tmux/trunk/FAQ
> 
> If you want reverse video *always*, then just fix screen's standout, but don't
> add sitm and ritm (remove the "-e '$s/$/ sitm=\\E[3m, ritm=\\E[23m,/'" above),
> or add them with \E[7m and \E[27m instead.
> 
>> If people are used to something, a new feature shouldn't spoil the fun.
> 
> The problem isn't in the feature, but in screen's terminfo, which swaps 
> reverse
> video and italics for no good reason (that I know of ;)). tmux used to
> force reverse over italics because of this, and now it doesn't anymore.
> 
>>   0 4 # infocmp screen | g 'sitm|bce'
> 
> Applications aren't asking for sitm, they're asking for standout through
> smso or sgr, but are getting \E[3m when they should be getting \E[7m.
> 
> Try 
> 
> $ infocmp screen | grep -o '\(smso\|sgr\)=[^,]*,'
> 
> and you'll see the problem (3s instead of 7s).

I don't understand, because there's neither here in my output:

  $ infocmp screen | grep -o '\(smso\|sgr\)=[^,]*,'
  
sgr=\E[0%?%p6%t;1%;%?%p1%t;3%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
  smso=\E[3m,

(on archlinux, /usr/share/terminfo/s/screen is owned by ncurses 5.9-1)

Thanks for explaining this issue again for me.  I'm just too lazy to
make or change terminfo db entries on all my machines, but afterall your
new feature adds to tmux capabilities.

I used a simpler workaround which gave me back what I grew accustomed
to:

terminal-overrides
"*:sitm@,ritm@,bce,colors=88,*88col*:colors=88,*256col*:colors=256"

My problem actually wasn't missing italics:  when using the highligthing
search in manuals, where "man <something>" uses the less pager, the
first thing I noticed was the prompt area:  all italics, barely
readable, and instead of highligthed substrings italics which just
cannot be found as easily (read: almost impossible to spot, making
searches more trouble instead of less).


clemens


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to