Minor refactoring of mc shutdown.

Move calls of disable_mouse() and disable_bracketed_paste()
to main() because init_mouse() and enable_bracketed_paste()
are called here.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2016-05-17 21:14:09 +03:00
parent 47cee2d241
commit c343697407
3 changed files with 4 additions and 4 deletions

View File

@ -221,8 +221,6 @@ tty_init (gboolean mouse_enable, gboolean is_xterm)
void
tty_shutdown (void)
{
disable_mouse ();
disable_bracketed_paste ();
tty_reset_shell_mode ();
tty_noraw_mode ();
tty_keypad (FALSE);

View File

@ -349,8 +349,6 @@ tty_shutdown (void)
{
char *op_cap;
disable_mouse ();
disable_bracketed_paste ();
tty_reset_shell_mode ();
tty_noraw_mode ();
tty_keypad (FALSE);

View File

@ -402,6 +402,10 @@ main (int argc, char *argv[])
else
exit_code = do_nc ()? EXIT_SUCCESS : EXIT_FAILURE;
disable_bracketed_paste ();
disable_mouse ();
/* Save the tree store */
(void) tree_store_save ();