diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-20 20:44:17 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-20 20:44:17 +0000 |
commit | 2416437eb850dd800cb61369297d35d928ce2be5 (patch) | |
tree | 2dbcb4485973f266aa271fd2f991f6e386901887 /src/fe-text | |
parent | 94be91c30eea06976b12e4ccbd3087c06944304d (diff) | |
download | irssi-2416437eb850dd800cb61369297d35d928ce2be5.zip |
/SET colors OFF should work even if /SET term_force_colors is ON
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2131 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text')
-rw-r--r-- | src/fe-text/term.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/fe-text/term.c b/src/fe-text/term.c index f4f830ac..8c3cc95e 100644 --- a/src/fe-text/term.c +++ b/src/fe-text/term.c @@ -36,6 +36,7 @@ int term_use_colors; +static int force_colors; static int resize_dirty; /* Resize the terminal if needed */ @@ -92,19 +93,14 @@ static void read_settings(void) { int old_colors = term_use_colors; - if (settings_get_bool("term_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; + if (force_colors != settings_get_bool("term_force_colors")) { + force_colors = !settings_get_bool("term_force_colors"); + term_force_colors(force_colors); } + term_use_colors = settings_get_bool("colors") && + (force_colors || term_has_colors()); + if (term_use_colors != old_colors) irssi_redraw(); } |