* gnulib-local/lib/term-ostream.oo.c (out_attr_change): Modify active_attr
before emitting the escape sequences, not afterwards.
* libtextstyle/NEWS: Mention the fix.
attributes_t old_attr = stream->active_attr;
bool cleared_attributes;
+ /* Keep track of the active attributes. Do this *before* emitting the
+ escape sequences, otherwise async_set_attributes_from_default will not
+ do its job correctly. */
+ stream->active_attr = new_attr;
+
/* For out_char to work. */
out_stream = stream;
out_fd = stream->fd;
{
out_underline_change (stream, new_attr.underline, false);
}
-
- /* Keep track of the active attributes. */
- stream->active_attr = new_attr;
}
static void
* Fixed a couple of reliability bugs:
- When a program exits while the terminal was in non-default state, the
library left the terminal with ECHO off.
+ - The SIGCONT signal handler would fail to restore the proper styling,
+ with a low probability.
- The SIGTSTP and SIGCONT signal handlers could clobber errno.
New in 0.7: