Hyphen in variable name fixed
This commit is contained in:
parent
9d19c3aee6
commit
81cbd4c8a0
@ -152,7 +152,7 @@ class HintContext:
|
||||
to_follow: The link to follow when enter is pressed.
|
||||
args: Custom arguments for userscript/spawn
|
||||
rapid: Whether to do rapid hinting.
|
||||
addhistory: Whether to add yanked or spawned link to the history.
|
||||
add_history: Whether to add yanked or spawned link to the history.
|
||||
filterstr: Used to save the filter string for restoring in rapid mode.
|
||||
tab: The WebTab object we started hinting in.
|
||||
group: The group of web elements to hint.
|
||||
@ -165,7 +165,7 @@ class HintContext:
|
||||
self.baseurl = None
|
||||
self.to_follow = None
|
||||
self.rapid = False
|
||||
self.addhistory = False
|
||||
self.add_history = False
|
||||
self.filterstr = None
|
||||
self.args = []
|
||||
self.tab = None
|
||||
@ -604,14 +604,14 @@ class HintManager(QObject):
|
||||
star_args_optional=True, maxsplit=2)
|
||||
@cmdutils.argument('win_id', win_id=True)
|
||||
def start(self, rapid=False, group=webelem.Group.all, target=Target.normal,
|
||||
*args, win_id, mode=None, addhistory=False):
|
||||
*args, win_id, mode=None, add_history=False):
|
||||
"""Start hinting.
|
||||
|
||||
Args:
|
||||
rapid: Whether to do rapid hinting. This is only possible with
|
||||
targets `tab` (with background-tabs=true), `tab-bg`,
|
||||
`window`, `run`, `hover`, `userscript` and `spawn`.
|
||||
addhistory: Whether to add spawned or yanked link to the
|
||||
add_history: Whether to add spawned or yanked link to the
|
||||
browsing history.
|
||||
group: The element types to hint.
|
||||
|
||||
@ -695,7 +695,7 @@ class HintManager(QObject):
|
||||
self._context.target = target
|
||||
self._context.rapid = rapid
|
||||
self._context.hint_mode = mode
|
||||
self._context.addhistory = addhistory
|
||||
self._context.add_history = add_history
|
||||
try:
|
||||
self._context.baseurl = tabbed_browser.current_url()
|
||||
except qtutils.QtValueError:
|
||||
@ -865,7 +865,7 @@ class HintManager(QObject):
|
||||
return
|
||||
handler = functools.partial(url_handlers[self._context.target],
|
||||
url, self._context)
|
||||
if self._context.addhistory:
|
||||
if self._context.add_history:
|
||||
objreg.get('web-history').add_url(url, "")
|
||||
else:
|
||||
raise ValueError("No suitable handler found!")
|
||||
|
@ -60,7 +60,7 @@ Feature: Page history
|
||||
|
||||
Scenario: History with yanked URL and 'add to history' flag
|
||||
When I open data/hints/html/simple.html
|
||||
And I hint with args "--addhistory links yank" and follow a
|
||||
And I hint with args "--add-history links yank" and follow a
|
||||
Then the history file should contain:
|
||||
http://localhost:(port)/data/hints/html/simple.html Simple link
|
||||
http://localhost:(port)/data/hello.txt
|
||||
|
Loading…
Reference in New Issue
Block a user