Fixed none set mode if a unknown command was run.
authorDaniel Carl <danielcarl@gmx.de>
Sat, 29 Jun 2013 17:00:52 +0000 (19:00 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Sat, 29 Jun 2013 17:00:52 +0000 (19:00 +0200)
If a wrong command was run from inputbox the error message appeared but vimb
kept in command mode so that the normal mode commands did not work. Now the
mode is set to normal mode if a command could not be found.

src/command.c

index 9ffb6f0..286ef3b 100644 (file)
@@ -233,6 +233,7 @@ gboolean command_run_string(const char *input)
     Command command = NULL;
     Arg arg = {0};
     if (!command_parse_from_string(input, &command, &arg, &vb.state.count)) {
+        vb_set_mode(VB_MODE_NORMAL, false);
         return false;
     }