(mc_skin_init): don't check TTY color supports if not required.

Don't check TTY color support if skon doesn't require 256 colors or
true colors.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2019-02-21 13:35:12 +03:00
parent 28926c5760
commit 1db894f63c

View File

@ -147,7 +147,7 @@ mc_skin_init (const gchar * skin_override, GError ** mcerror)
(void) mc_skin_ini_file_parse (&mc_skin__default); (void) mc_skin_ini_file_parse (&mc_skin__default);
is_good_init = FALSE; is_good_init = FALSE;
} }
if (is_good_init && !tty_use_truecolors (&error) && mc_skin__default.have_true_colors) if (is_good_init && mc_skin__default.have_true_colors && !tty_use_truecolors (&error))
{ {
mc_propagate_error (mcerror, 0, mc_propagate_error (mcerror, 0,
_ _
@ -159,7 +159,7 @@ mc_skin_init (const gchar * skin_override, GError ** mcerror)
(void) mc_skin_ini_file_parse (&mc_skin__default); (void) mc_skin_ini_file_parse (&mc_skin__default);
is_good_init = FALSE; is_good_init = FALSE;
} }
if (is_good_init && !tty_use_256colors () && mc_skin__default.have_256_colors) if (is_good_init && mc_skin__default.have_256_colors && !tty_use_256colors ())
{ {
mc_propagate_error (mcerror, 0, mc_propagate_error (mcerror, 0,
_ _