Merge branch 'rcorre-rapid_normal_hints'

This commit is contained in:
Florian Bruhin 2016-06-04 23:14:37 +02:00
commit 1601b85d16
4 changed files with 28 additions and 1 deletions

View File

@ -54,6 +54,9 @@ Changed
- URLs are now shown decoded when hovering.
- Keybindings are now shown in the command completion
- Improved behavior when pasting multiple lines
- Rapid hints can now also be used for the `normal` hint target, which can be
useful with javascript click handlers or checkboxes which don't actually open
a new page.
Fixed
-----

View File

@ -846,7 +846,7 @@ class HintManager(QObject):
if rapid:
if target in [Target.tab_bg, Target.window, Target.run,
Target.hover, Target.userscript, Target.spawn,
Target.download]:
Target.download, Target.normal, Target.current]:
pass
elif (target == Target.tab and
config.get('tabs', 'background-tabs')):

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Rapid hinting with buttons</title>
</head>
<body>
<input type="text" id="number" value="0"/>
<button onclick="console.log('beep!')">beep!</button>
<button onclick="console.log('bop!')">bop!</button>
<button onclick="console.log('boop!')">boop!</button>
</body>
</html>

View File

@ -97,6 +97,16 @@ Feature: Using hints
And I run :follow-hint a
Then the clipboard should contain "http://localhost:(port)/data/hello.txt"
Scenario: Using hint --rapid to hit multiple buttons
When I open data/hints/buttons.html
And I run :hint --rapid
And I run :follow-hint s
And I run :follow-hint d
And I run :follow-hint f
Then the javascript message "beep!" should be logged
And the javascript message "bop!" should be logged
And the javascript message "boop!" should be logged
### iframes
### FIXME currenly skipped, see https://github.com/The-Compiler/qutebrowser/issues/1525