Commit 7930774b 7930774b90e9fe211f85e7219e62feca198fe8d8 by Sergey Poznyakoff

(util_do_command): Interpret empty line as "next" command only when in

interactive mode.
1 parent e2e7e806
......@@ -104,12 +104,17 @@ util_do_command (const char *c, ...)
return 0;
}
/* Hitting return i.e. no command, is equivalent to next
according to the POSIX spec. */
if (cmd[0] == '\0')
{
free (cmd);
/* Hitting return i.e. no command, is equivalent to next
according to the POSIX spec. Note, that this applies
to interactive state only. */
if (interactive)
cmd = strdup ("next");
else
return 0;
}
if (argcv_get (cmd, delim, NULL, &argc, &argv) == 0)
......