diff options
-rw-r--r-- | mail/util.c | 11 |
1 files 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) |