From a03a3465979a79510d667c4c8ae9ec0bef291ddc Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Sun, 30 Nov 2014 22:22:08 +0100 Subject: 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. --- src/hints.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/hints.c') 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)) { -- cgit v1.2.3