From: Daniel Carl Date: Sun, 8 Feb 2015 21:25:20 +0000 (+0100) Subject: Don't remove error message if command is not known. X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=7cc68065c7d90a32ca067d79795702b350b6803e;p=vimb.git Don't remove error message if command is not known. If an unknown command was typed into inputbox the inputbox was still color in the error color, but the content was removed so that the user is not informed about the reason for the error. Even more critical was this in case the 'input-autohide' is enabled. In this case the clearing of the input box caused the hiding of this, so that the user will never see that the command failed. --- diff --git a/src/ex.c b/src/ex.c index de10699..1960e7e 100644 --- a/src/ex.c +++ b/src/ex.c @@ -478,7 +478,7 @@ VbCmdResult ex_run_string(const char *input, gboolean enable_history) /* copy to have original command for history */ const char *in = input; gboolean nohist = false; - VbCmdResult res = VB_CMD_ERROR; + VbCmdResult res = VB_CMD_ERROR | VB_CMD_KEEPINPUT; ExArg *arg = g_slice_new0(ExArg); arg->lhs = g_string_new(""); arg->rhs = g_string_new("");