(main): call tty_check_term() right after mc_args_parse().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2023-12-27 10:22:24 +03:00
parent 07db4c4fa3
commit 19d852dbd3
1 changed files with 7 additions and 7 deletions

View File

@ -279,6 +279,13 @@ main (int argc, char *argv[])
return exit_code;
}
/* check terminal type
* $TERM must be set and not empty
* mc_global.tty.xterm_flag is used in init_key() and tty_init()
* Do this after mc_args_parse() where mc_args__force_xterm is set up.
*/
mc_global.tty.xterm_flag = tty_check_term (mc_args__force_xterm);
/* do this before mc_args_show_info () to view paths in the --datadir-info output */
OS_Setup ();
@ -346,13 +353,6 @@ main (int argc, char *argv[])
vfs_path_free (vpath, TRUE);
}
/* check terminal type
* $TERM must be set and not empty
* mc_global.tty.xterm_flag is used in init_key() and tty_init()
* Do this after mc_args_handle() where mc_args__force_xterm is set up.
*/
mc_global.tty.xterm_flag = tty_check_term (mc_args__force_xterm);
/* NOTE: This has to be called before tty_init or whatever routine
calls any define_sequence */
init_key ();