1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-30 06:45:25 +00:00

/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
This commit is contained in:
Timo Sirainen 2001-11-20 20:44:17 +00:00 committed by cras
parent 94be91c30e
commit 2416437eb8

View File

@ -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();
}