Fixed duplicate hint call if filtered by label.
authorDaniel Carl <danielcarl@gmx.de>
Mon, 24 Nov 2014 21:36:03 +0000 (22:36 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Mon, 24 Nov 2014 21:36:03 +0000 (22:36 +0100)
If hints where fired by their label, the action was done twice one tome for
the hint fired by filtering and after that because of the timeout. This issue
was introduced during the changes for the letter hints.

src/hints.c

index f5fd307..fbeb631 100644 (file)
@@ -97,10 +97,10 @@ VbResult hints_keypress(int key)
 
         return RESULT_COMPLETE;
     } else {
+        fire_timeout(true);
         /* try to handle the key by the javascript */
         arguments[0] = js_string_to_ref(hints.ctx, (char[]){key, '\0'});
         if (call_hints_function("update", 1, arguments)) {
-            fire_timeout(true);
             return RESULT_COMPLETE;
         }
     }