Move endwin() down in wins_prepare_external()

Invoke endwin() *after* calling any other curses functions, such as
refresh(). Calling refresh() after endwin() might restore curses mode
which is a bad thing for a terminal mode initialization routine.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-07-05 15:42:40 +02:00
parent 233980622f
commit 2f8a425756

View File

@ -606,10 +606,10 @@ wins_prepare_external (void)
if (notify_bar ())
notify_stop_main_thread ();
def_prog_mode ();
endwin ();
ui_mode = UI_CMDLINE;
clear ();
wins_refresh ();
endwin ();
}
/* Restore windows when returning from an external command. */