/* check for escape or modkeys or counts */
if (IS_ESCAPE_KEY(keyval, state)) {
+ vb.state.modkey = vb.state.count = 0;
/* switch to normal mode and clear the input box */
vb_set_mode(VB_MODE_NORMAL, true);
Keybind *keybind = (Keybind*)link->data;
command_run(keybind->command, keybind->param);
+ vb.state.modkey = vb.state.count = 0;
+ vb_update_statusbar();
+
return true;
}
uri = g_strdup_printf("http://%s", path);
}
- /* change state to normal mode */
- vb_set_mode(VB_MODE_NORMAL, false);
-
if (arg->i == VB_TARGET_NEW) {
guint i = 0;
char *cmd[7], xid[64];
*/
gboolean vb_set_mode(Mode mode, gboolean clean)
{
- vb.state.modkey = vb.state.count = 0;
-
/* process only if mode has changed */
if (vb.state.mode != mode) {
/* leaf the old mode */
run_user_script(frame);
}
- /* status bar is updated by vb_set_mode */
- vb_set_mode(VB_MODE_NORMAL , false);
+ if (vb.state.mode & VB_MODE_INSERT) {
+ /* status bar is updated by vb_set_mode */
+ vb_set_mode(VB_MODE_NORMAL, false);
+ } else {
+ vb_update_statusbar();
+ }
vb_update_urlbar(uri);
break;