commandline: Don't complain if insert mode has nothing to insert

That's just, like, a normal thing to happen.

We can return false, but it's not an error worth complaining about.

See #6931.
This commit is contained in:
Fabian Homborg
2020-04-23 17:17:19 +02:00
parent 02baa321ae
commit 1d57da7291

View File

@@ -340,11 +340,8 @@ int builtin_commandline(parser_t &parser, io_streams_t &streams, wchar_t **argv)
}
if (append_mode && !(argc - w.woptind)) {
streams.err.append_format(
BUILTIN_ERR_COMBO2, cmd,
L"insertion mode switches can not be used when not in insertion mode");
builtin_print_error_trailer(parser, streams.err, cmd);
return STATUS_INVALID_ARGS;
// No tokens in insert mode just means we do nothing.
return STATUS_CMD_ERROR;
}
// Set default modes.