diff options
author | Daniel Carl <danielcarl@gmx.de> | 2013-06-13 00:13:43 +0200 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2013-06-13 09:58:54 +0200 |
commit | 57711abd9fb230e722ac52df164aa79d4970cec9 (patch) | |
tree | 571a2433ccbb5c647ed29ee1757c63cfb9368e16 /src/main.c | |
parent | 0a13db75be823f15fe4e5b4eacd604718968c111 (diff) |
Fixed leaving input mode on load commit (#33).
If a page was loaded and text was typed into the inputbox, the input
mode was left on WEBKIT_LOAD_COMMITED. Now we keep in insert mode also if
the page loads to allow to type in a command into inputbox.
Moved modkey unset to keybind.c where the modkeys are set.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -149,9 +149,6 @@ gboolean vb_load_uri(const Arg *arg) 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]; @@ -205,8 +202,6 @@ gboolean vb_set_clipboard(const Arg *arg) */ 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 */ @@ -421,8 +416,12 @@ static void webview_load_status_cb(WebKitWebView *view, GParamSpec *pspec) 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; |