From 1d57da72915f9e8415696d028de241f14321ef2a Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 23 Apr 2020 17:17:19 +0200 Subject: [PATCH] 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. --- src/builtin_commandline.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/builtin_commandline.cpp b/src/builtin_commandline.cpp index bfa4211b2..1ee6fbc93 100644 --- a/src/builtin_commandline.cpp +++ b/src/builtin_commandline.cpp @@ -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.