Don't remove error message if command is not known.
authorDaniel Carl <danielcarl@gmx.de>
Sun, 8 Feb 2015 21:25:20 +0000 (22:25 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Sun, 8 Feb 2015 21:25:20 +0000 (22:25 +0100)
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.

src/ex.c

index de10699..1960e7e 100644 (file)
--- 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("");