Browse Source

(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>
Andrew Borodin 6 years ago
parent
commit
1db894f63c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/skin/common.c

+ 2 - 2
lib/skin/common.c

@@ -147,7 +147,7 @@ mc_skin_init (const gchar * skin_override, GError ** mcerror)
         (void) mc_skin_ini_file_parse (&mc_skin__default);
         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,
                             _
@@ -159,7 +159,7 @@ mc_skin_init (const gchar * skin_override, GError ** mcerror)
         (void) mc_skin_ini_file_parse (&mc_skin__default);
         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,
                             _