diff options
Diffstat (limited to 'gdb/ui-file.c')
-rw-r--r-- | gdb/ui-file.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/gdb/ui-file.c b/gdb/ui-file.c index dd15ea4..1a2f5635 100644 --- a/gdb/ui-file.c +++ b/gdb/ui-file.c @@ -180,28 +180,12 @@ null_file::write_async_safe (const char *buf, long sizeof_buf) -/* true if the gdb terminal supports styling, and styling is enabled. */ +/* Return true if styling is currently enabled. */ static bool term_cli_styling () { - if (!cli_styling) - return false; - - const char *term = getenv ("TERM"); - /* Windows doesn't by default define $TERM, but can support styles - regardless. */ -#ifndef _WIN32 - if (term == nullptr || !strcmp (term, "dumb")) - return false; -#else - /* But if they do define $TERM, let us behave the same as on Posix - platforms, for the benefit of programs which invoke GDB as their - back-end. */ - if (term && !strcmp (term, "dumb")) - return false; -#endif - return true; + return cli_styling; } |