diff options
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index 7584d5a..398dd30 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1442,9 +1442,11 @@ set_output_style (struct ui_file *stream, const ui_file_style &style) if (!stream->can_emit_style_escape ()) return; - /* Note that we don't pass STREAM here, because we want to emit to + /* Note that we may not pass STREAM here, when we want to emit to the wrap buffer, not directly to STREAM. */ - emit_style_escape (style); + if (stream == gdb_stdout) + stream = nullptr; + emit_style_escape (style, stream); } /* See utils.h. */ |