summaryrefslogtreecommitdiff
path: root/src/fe-text/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-text/term.c')
-rw-r--r--src/fe-text/term.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/fe-text/term.c b/src/fe-text/term.c
index 97764ac1..a20f7b50 100644
--- a/src/fe-text/term.c
+++ b/src/fe-text/term.c
@@ -92,9 +92,14 @@ static void read_settings(void)
{
int old_colors = term_use_colors;
- if (settings_get_bool("force_colors"))
- term_use_colors = TRUE;
- else {
+ if (settings_get_bool("force_colors")) {
+ if (!term_use_colors) {
+ term_force_colors(TRUE);
+ term_use_colors = TRUE;
+ }
+ } else {
+ if (!term_has_colors() && term_use_colors)
+ term_force_colors(FALSE);
term_use_colors = settings_get_bool("colors");
if (term_use_colors && !term_has_colors())
term_use_colors = FALSE;
@@ -111,7 +116,9 @@ void term_common_init(void)
#endif
settings_add_bool("lookandfeel", "colors", TRUE);
settings_add_bool("lookandfeel", "force_colors", FALSE);
- term_use_colors = settings_get_bool("colors");
+
+ term_use_colors = term_has_colors() && settings_get_bool("colors");
+ read_settings();
signal_add("beep", (SIGNAL_FUNC) term_beep);
signal_add("setup changed", (SIGNAL_FUNC) read_settings);