mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-02 12:37:05 +08:00
Reset terminal styles
This adds a function that can be used to reset terminal styles, regardless of what style the low-level output routines currently think is applied. This is used to make "echo" and "printf" work properly when emitting ANSI terminal escapes -- now gdb will reset the style at the end of the command. gdb/ChangeLog 2018-12-28 Tom Tromey <tom@tromey.com> * utils.h (reset_terminal_style): Declare. * utils.c (can_emit_style_escape): New function. (set_output_style): Use it. (reset_terminal_style): New function. * printcmd.c (printf_command): Call reset_terminal_style. * cli/cli-cmds.c (echo_command): Call reset_terminal_style.
This commit is contained in:
@ -689,6 +689,8 @@ echo_command (const char *text, int from_tty)
|
||||
printf_filtered ("%c", c);
|
||||
}
|
||||
|
||||
reset_terminal_style (gdb_stdout);
|
||||
|
||||
/* Force this output to appear now. */
|
||||
wrap_here ("");
|
||||
gdb_flush (gdb_stdout);
|
||||
|
Reference in New Issue
Block a user