Ticket #2512 (fixup for usermenu)

Fixed user menu behaviour. MC hangs if menu entry contains the 'read' command or something like that.
    bug introduced in the Ticket #323 (changeset: 0cfbe19d96).

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
Ilia Maslakov 2011-03-14 12:58:31 +00:00
parent 3fec8a4282
commit 4015e14aff
1 changed files with 3 additions and 3 deletions

View File

@ -868,7 +868,7 @@ user_menu_cmd (struct WEdit *edit_widget, const char *menu_file, int selected_en
int selected, old_patterns;
Listbox *listbox;
gboolean res = FALSE;
gboolean interactive = FALSE;
gboolean interactive = TRUE;
if (!vfs_current_is_local ())
{
@ -956,8 +956,8 @@ user_menu_cmd (struct WEdit *edit_widget, const char *menu_file, int selected_en
if (*p == '#')
{
/* show prompt if first line of external script is #interactive */
if (selected_entry >= 0 && strncmp (p, "#interactive", 12) == 0)
interactive = TRUE;
if (selected_entry >= 0 && strncmp (p, "#silent", 7) == 0)
interactive = FALSE;
/* A commented menu entry */
accept_entry = 1;
}