diff options
author | Daniel Carl <danielcarl@gmx.de> | 2014-11-30 22:22:08 +0100 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2014-11-30 22:28:31 +0100 |
commit | a03a3465979a79510d667c4c8ae9ec0bef291ddc (patch) | |
tree | 6d98560858aa51d709cfa76e6af71028aa5dd357 /src/hints.c | |
parent | 29d87dc5586fdaf36998975735463c9276ca1d3c (diff) |
Fixed none working focus event observing (#112).
Now the strict-focus=on prevents vimb only from switching to input mode if
focus is on editable element on page load (for example set by a body onload
script). Vimb follow all further focus events.
Diffstat (limited to 'src/hints.c')
-rw-r--r-- | src/hints.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hints.c b/src/hints.c index fbeb631..9dec4ad 100644 --- a/src/hints.c +++ b/src/hints.c @@ -302,7 +302,11 @@ static gboolean call_hints_function(const char *func, int count, JSValueRef para /* following return values mark fired hints */ if (!strncmp(value, "DONE:", 5)) { fire_timeout(false); - if (!hints.gmode) { + /* Change to normal mode only if we are crrently in command mode and + * we are not in g-mode hinting. This is required to not switch to + * normal mode when the hinting triggered a click that set focus on + * editable element that lead vimb to switch to input mode. */ + if (!hints.gmode && vb.mode->id == 'c') { mode_enter('n'); } } else if (!strncmp(value, "INSERT:", 7)) { |