From 7930774b90e9fe211f85e7219e62feca198fe8d8 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Wed, 13 Nov 2002 08:28:06 +0000 Subject: (util_do_command): Interpret empty line as "next" command only when in interactive mode. --- mail/util.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mail/util.c b/mail/util.c index 2422e3ea9..1714eba3c 100644 --- a/mail/util.c +++ b/mail/util.c @@ -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); - cmd = strdup ("next"); + + /* 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) -- cgit v1.2.1