Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: End boldface also ends background color
On Thu, Mar 24, 2016 at 10:38:37AM +0000, Peter Stephenson wrote:
> On Wed, 23 Mar 2016 18:53:56 -0700
> Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > There's no TCBOLDFACEEND, which I presume is why %b resorts to turning
> > off everything. But I don't know much about how the txt* macros work.
>
> The bottom level of this, where it feeds into termcap, is
> settextattributes() in zle_referesh.c:
>
> if (txtchangeisset(atr, TXTNOBOLDFACE))
> tsetcap(TCALLATTRSOFF, 0);
>
> Even in terminfo there doesn't seem to be exit_bold_mode, unlike
> standout, reverse and underline (though it looks like standout maps to
> reverse here).
>
> If you look at the definitions, you'll see that \e[1m turns on bold,
> \e[7m reverse, \e[4m underline. The definitions mapping to exit reverse
> and exit underline are \e[27m and \e[24m. Nothing maps to \e[21m that I
> can see. It works on some terminals, I used gnome-terminal:
>
> print -P "first%Ufoo%{\e[1m%}bar%{\e[21m%}more%ulast"
>
> However, that didn't seem to work on xterm (a few years old), so
> apparently we can't assume it.
Worth at least pinging Thomas Dickey to add the capability to xterm, and to
create a new capability for ncurses -- or at least find out if there's a
reason it doesn't exist? Once you build zsh against the new version of
both, it would work, and you'd get historical behavior until then.
Danek
Messages sorted by:
Reverse Date,
Date,
Thread,
Author