Bug#910078: the bold capability does not work after sgr0

2018-10-02 Thread Egmont Koblinger
A minor correction: The said changes appeared in vte 0.52
(gnome-terminal 3.28). Version 0.54 didn't change anything around
colors.



Bug#910078: the bold capability does not work after sgr0

2018-10-02 Thread Egmont Koblinger
Hi,

At the end of your prompt you emit \e[37m, that is, change to the 7th
palette color (typically light gray), rather than the default color of
your emulator. That is, the status at the beginning of executing your
command, the status used for the letter "A" is not the default status,
not the one which you achieve using tput sgr0 or \e[m or \e[0m. This
explains why "B" and "D" don't have the same attributes.

Go to GNOME Terminal's preferences, switch to the Colors tab under
your profile. You'll find the "Default color" (potentially overridden
by "Use colors from system theme"), this is what sgr0 a.k.a. \e[m
switches to. You'll also see the 2x8 "Color palette" entries, the
upper right of them is selected by \e[37m. Even if these two have the
very same RGB value, they might behave differently when combined with
the ambiguous "bold/bright" flag.

VTE 0.54 changed a couple of things in how it handles colors. The
changes were intentional, made in the direction of separating the bold
attribute from the colors.

The bold counterpart of the default color used to be an automatically
generated brighter variant of that color. If your default text color
is a light shade of gray, the automatically generated brigher variant
was most likely #FF. It's no longer the case, the combination of
the bold flag with the default text color still uses the exact same
text color, just with bold font. If you preferred the old behavior of
making the text brighter, you should set whatever color you'd prefer
here as the "Bold color".

For the 7th palette color, the bold variant used to switch to the 15th
palette color (the one shown underneath). Beginning with 0.54 this
behavior is no longer mandatory, can be switched off by disabling
"Show bold text in bright colors". (By the way, starting with 0.56
it'll be disabled by default for new users. The same checkbox will
remain there for users to re-enable switching to the brighter
counterpart.)

I hope this clarifies what's going on.

cheers,
egmont



Bug#910078: the bold capability does not work after sgr0

2018-10-02 Thread Marco d'Itri
Package: libvte-2.91-0
Version: 0.54.0-1
Severity: normal

Test case:

echo "A$(tput bold)B$(tput sgr0)C$(tput bold)D$(tput sgr0)E"

Expected results (verified with xterm and others): B and D are printed 
in bold (i.e. white, not grey).
Actual results: only B is printed in bold.

Something in my prompt fixes whatever is broken and makes bold work 
again:

PS1="\\[\\033]0;\\h: 
\\w\\007\\]\\[\\e[0;32m\\]\\u@\\[\\e[36m\\]\\h\\[\\e[32m\\]:\\[\\e[31m\\]\\w\\\$\\[\\e[37m\\]"

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8), 
LANGUAGE=it_IT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gnome-terminal depends on:
ii  dbus-user-session [default-dbus-session-bus]  1.12.10-1
ii  dbus-x11 [dbus-session-bus]   1.12.10-1
ii  dconf-gsettings-backend [gsettings-backend]   0.30.0-1
ii  gnome-terminal-data   3.30.0-1
ii  gsettings-desktop-schemas 3.28.1-1
ii  libatk1.0-0   2.30.0-1
ii  libc6 2.27-6
ii  libdconf1 0.30.0-1
ii  libglib2.0-0  2.58.1-2
ii  libgtk-3-03.24.1-2
ii  libpango-1.0-01.42.4-3
ii  libuuid1  2.32.1-0.1
ii  libvte-2.91-0 0.54.0-1
ii  libx11-6  2:1.6.6-1

Versions of packages gnome-terminal recommends:
ii  gvfs   1.38.0-2
pn  nautilus-extension-gnome-terminal  
ii  yelp   3.30.0-1

gnome-terminal suggests no packages.

-- no debconf information

-- 
ciao,
Marco


signature.asc
Description: PGP signature