From: Daniel Carl <danielcarl@gmx.de>
Date: Thu, 13 Jun 2013 11:18:21 +0000 (+0200)
Subject: Fixed errors on :quit called by kebinding (#34).
X-Git-Url: https://git.owens.tech/assets/dummy.html/assets/dummy.html/git?a=commitdiff_plain;h=ac9b3a59dd23ab3aa211e79236600a12b7c06e4f;p=vimb.git

Fixed errors on :quit called by kebinding (#34).

If vimb was quit by keybinding, we tried to update the status bar after the
widgets where destroyed that lead to errors.
---

diff --git a/src/keybind.c b/src/keybind.c
index b98e6d7..3cef457 100644
--- a/src/keybind.c
+++ b/src/keybind.c
@@ -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;
     }