Only set the ' mark on normal/current hinting.
Don't set ' for downloading, hovering, or opening a link in a tab.
This commit is contained in:
parent
268d490e25
commit
0755e163bb
@ -466,6 +466,13 @@ class HintManager(QObject):
|
|||||||
QMouseEvent(QEvent.MouseButtonRelease, pos, Qt.LeftButton,
|
QMouseEvent(QEvent.MouseButtonRelease, pos, Qt.LeftButton,
|
||||||
Qt.NoButton, modifiers),
|
Qt.NoButton, modifiers),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if context.target in [Target.normal, Target.current]:
|
||||||
|
# Set the pre-jump mark ', so we can jump back here after following
|
||||||
|
tabbed_browser = objreg.get('tabbed-browser', scope='window',
|
||||||
|
window=self._win_id)
|
||||||
|
tabbed_browser.set_mark("'")
|
||||||
|
|
||||||
if context.target == Target.current:
|
if context.target == Target.current:
|
||||||
elem.remove_blank_target()
|
elem.remove_blank_target()
|
||||||
for evt in events:
|
for evt in events:
|
||||||
@ -921,10 +928,6 @@ class HintManager(QObject):
|
|||||||
immediately=True)
|
immediately=True)
|
||||||
return
|
return
|
||||||
if self._context.target in elem_handlers:
|
if self._context.target in elem_handlers:
|
||||||
# Set the pre-jump mark ', so we can jump back here after following
|
|
||||||
tabbed_browser = objreg.get('tabbed-browser', scope='window',
|
|
||||||
window=self._win_id)
|
|
||||||
tabbed_browser.set_mark("'")
|
|
||||||
handler = functools.partial(
|
handler = functools.partial(
|
||||||
elem_handlers[self._context.target], elem, self._context)
|
elem_handlers[self._context.target], elem, self._context)
|
||||||
elif self._context.target in url_handlers:
|
elif self._context.target in url_handlers:
|
||||||
|
@ -81,3 +81,11 @@ Feature: Setting positional marks
|
|||||||
And I run :search-next
|
And I run :search-next
|
||||||
And I run :jump-mark "'"
|
And I run :jump-mark "'"
|
||||||
Then the page should be scrolled to 0 0
|
Then the page should be scrolled to 0 0
|
||||||
|
|
||||||
|
Scenario: Hovering a hint does not set the ' mark
|
||||||
|
When I run :scroll-px 30 20
|
||||||
|
And I run :scroll-perc 0
|
||||||
|
And I run :hint links hover
|
||||||
|
And I run :follow-hint s
|
||||||
|
And I run :jump-mark "'"
|
||||||
|
Then the page should be scrolled to 30 20
|
||||||
|
Loading…
Reference in New Issue
Block a user