* main.c (stop_dialogs): New function to stop all dialogs.
(quit_cmd_internal): Use stop_dialogs() instead of stopping midnight_dlg only. This fixes exit from the shell invoked from the internal viewer or editor.
Этот коммит содержится в:
родитель
90ae932bf6
Коммит
bbbb6eb183
@ -1,5 +1,10 @@
|
||||
2002-07-03 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* main.c (stop_dialogs): New function to stop all dialogs.
|
||||
(quit_cmd_internal): Use stop_dialogs() instead of stopping
|
||||
midnight_dlg only. This fixes exit from the shell invoked from
|
||||
the internal viewer or editor.
|
||||
|
||||
* cmd.c (view_other_cmd): Shut down extra select channels before
|
||||
switching to the shell. Restore them afterwards, but not if
|
||||
quit was requested. Skip more code on quit.
|
||||
|
14
src/main.c
14
src/main.c
@ -761,6 +761,16 @@ change_panel (void)
|
||||
dlg_one_down (midnight_dlg);
|
||||
}
|
||||
|
||||
/* Stop MC main dialog and the current dialog if it exists.
|
||||
* Needed to provide fast exit from MC viewer or editor on shell exit */
|
||||
static void stop_dialogs (void)
|
||||
{
|
||||
midnight_dlg->running = 0;
|
||||
if (current_dlg) {
|
||||
current_dlg->running = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
quit_cmd_internal (int quiet)
|
||||
{
|
||||
@ -777,11 +787,11 @@ quit_cmd_internal (int quiet)
|
||||
if (q){
|
||||
#ifdef HAVE_SUBSHELL_SUPPORT
|
||||
if (!use_subshell)
|
||||
midnight_dlg->running = 0;
|
||||
stop_dialogs ();
|
||||
else
|
||||
if ((q = exit_subshell ()))
|
||||
#endif
|
||||
midnight_dlg->running = 0;
|
||||
stop_dialogs ();
|
||||
}
|
||||
if (q)
|
||||
quit |= 1;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user