Fixed errors on :quit called by kebinding (#34).
authorDaniel Carl <danielcarl@gmx.de>
Thu, 13 Jun 2013 11:18:21 +0000 (13:18 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Thu, 13 Jun 2013 11:18:21 +0000 (13:18 +0200)
If vimb was quit by keybinding, we tried to update the status bar after the
widgets where destroyed that lead to errors.

src/keybind.c

index b98e6d7..3cef457 100644 (file)
@@ -273,12 +273,12 @@ static gboolean keypress_cb(WebKitWebView *webview, GdkEventKey *event)
     GSList *link = find(CLEAN_MODE(vb.state.mode), vb.state.modkey, state, keyval);
 
     if (link) {
-        Keybind *keybind = (Keybind*)link->data;
-        command_run(keybind->command, keybind->param);
-
         vb.state.modkey = vb.state.count = 0;
         vb_update_statusbar();
 
+        Keybind *keybind = (Keybind*)link->data;
+        command_run(keybind->command, keybind->param);
+
         return true;
     }