Disallow tab=None with objreg.get(scope='tab').
This would've made it a lot easier to detect #563.
This commit is contained in:
parent
7a4a4a4a4e
commit
adb11360db
@ -529,7 +529,7 @@ class CommandDispatcher:
|
|||||||
url = self._current_url()
|
url = self._current_url()
|
||||||
if frame is None:
|
if frame is None:
|
||||||
raise cmdexc.CommandError("No frame focused!")
|
raise cmdexc.CommandError("No frame focused!")
|
||||||
hintmanager = objreg.get('hintmanager', scope='tab')
|
hintmanager = objreg.get('hintmanager', scope='tab', tab='current')
|
||||||
if where == 'prev':
|
if where == 'prev':
|
||||||
hintmanager.follow_prevnext(frame, url, prev=True, tab=tab,
|
hintmanager.follow_prevnext(frame, url, prev=True, tab=tab,
|
||||||
background=bg, window=window)
|
background=bg, window=window)
|
||||||
|
@ -144,7 +144,7 @@ window_registry = ObjectRegistry()
|
|||||||
def _get_tab_registry(win_id, tab_id):
|
def _get_tab_registry(win_id, tab_id):
|
||||||
"""Get the registry of a tab."""
|
"""Get the registry of a tab."""
|
||||||
if tab_id is None:
|
if tab_id is None:
|
||||||
tab_id = 'current'
|
raise ValueError("Got tab_id None (win_id {})".format(win_id))
|
||||||
if tab_id == 'current' and win_id is None:
|
if tab_id == 'current' and win_id is None:
|
||||||
app = get('app')
|
app = get('app')
|
||||||
window = app.activeWindow()
|
window = app.activeWindow()
|
||||||
|
Loading…
Reference in New Issue
Block a user