Ignore hints -> scatter for number hints

See https://github.com/The-Compiler/qutebrowser/issues/308#issuecomment-167091450
This commit is contained in:
Florian Bruhin 2016-06-07 15:13:30 +02:00
parent 20636a2343
commit db0a67766d
6 changed files with 13 additions and 5 deletions

View File

@ -65,6 +65,7 @@ Changed
- Number hints are now kept filtered after following a hint in rapid mode.
- Number hints are now renumbered after filtering
- Number hints can now be filtered with multiple space-separated search terms
- `hints -> scatter` is now ignored for number hints
Fixed
-----

View File

@ -223,7 +223,7 @@ class HintManager(QObject):
else:
chars = config.get('hints', 'chars')
min_chars = config.get('hints', 'min-chars')
if config.get('hints', 'scatter'):
if config.get('hints', 'scatter') and hint_mode != 'number':
return self._hint_scattered(min_chars, chars, elems)
else:
return self._hint_linear(min_chars, chars, elems)

View File

@ -898,7 +898,7 @@ def data(readonly=False):
('scatter',
SettingValue(typ.Bool(), 'true'),
"Whether to scatter hint key chains (like Vimium) or not (like "
"dwb)."),
"dwb). Ignored for number hints."),
('uppercase',
SettingValue(typ.Bool(), 'false'),

View File

@ -10,7 +10,7 @@
</p>
<p>
This requires setting hints -&gt; mode to number, and hints -&gt; scatter to false.
This requires setting hints -&gt; mode to number.
</p>
<p>

View File

@ -6,7 +6,7 @@
</head>
<body>
<p>
This page contains various links to test numbered hints. This requires setting hints -> mode to number, and hints -> scatter to false.
This page contains various links to test numbered hints. This requires setting hints -> mode to number.
</p>
<p>

View File

@ -193,7 +193,6 @@ Feature: Using hints
Scenario: Keeping hints filter when using backspace
When I open data/hints/issue1186.html
And I set hints -> mode to number
And I set hints -> scatter to false
And I run :hint all
And I press the key "x"
And I press the key "0"
@ -210,3 +209,11 @@ Feature: Using hints
And I run :hint all
And I press the keys "ten pos"
Then data/numbers/11.txt should be loaded
Scenario: Scattering is ignored with number hints
When I open data/hints/number.html
And I set hints -> mode to number
And I set hints -> scatter to true
And I run :hint all
And I run :follow-hint 00
Then data/numbers/1.txt should be loaded