Quit hinting on mouse click.
authorDaniel Carl <danielcarl@gmx.de>
Sat, 7 Feb 2015 21:59:33 +0000 (22:59 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Sat, 7 Feb 2015 21:59:33 +0000 (22:59 +0100)
In case the user starts hinting and clicked with the mouse on a link, the new
page was opened. But after going back in back/forward history, the old page
was shown with the hints, but the browser was in normal mode so that the hints
where disfunctional and could only be removed by reloading the page.
Now vimb switches back to normal mode in case the user does a mouse click.

src/main.c

index 315d670..eddabd1 100644 (file)
@@ -1185,9 +1185,9 @@ static gboolean button_relase_cb(WebKitWebView *webview, GdkEventButton *event)
              * used for WYSIWYG editors where the click runs into a div and
              * not the editable element itself. */
             mode_enter('i');
-        } else if (vb.mode->id == 'i') {
-            /* make sure we leave insert mode if the user click on a none
-             * editable element */
+        } else if (vb.mode->id == 'i' || vb.mode->id == 'c') {
+            /* make sure we leave insert mode or command/hint mode if the user
+             * click on a none editable element */
             mode_enter('n');
         }
     }