summaryrefslogtreecommitdiff
path: root/qutebrowser/browser/commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/browser/commands.py')
-rw-r--r--qutebrowser/browser/commands.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py
index 804ad4e6a..ac99c9347 100644
--- a/qutebrowser/browser/commands.py
+++ b/qutebrowser/browser/commands.py
@@ -228,7 +228,8 @@ class CommandDispatcher:
self._tabbed_browser.close_tab(tab)
tabbar.setSelectionBehaviorOnRemove(old_selection_behavior)
- def _tab_close_prompt_if_pinned(self, tab, force, yes_action):
+ @staticmethod
+ def tab_close_prompt_if_pinned(tab, force, yes_action):
"""Helper method for tab_close.
If tab is pinned, prompt. If everything is good, run yes_action.
@@ -261,7 +262,7 @@ class CommandDispatcher:
close = functools.partial(self._tab_close, tab, prev,
next_, opposite)
- self._tab_close_prompt_if_pinned(tab, force, close)
+ CommandDispatcher.tab_close_prompt_if_pinned(tab, force, close)
@cmdutils.register(instance='command-dispatcher', scope='window',
name='tab-pin')
@@ -928,7 +929,7 @@ class CommandDispatcher:
if not force:
for i, tab in enumerate(self._tabbed_browser.widgets()):
if _to_close(i) and tab.data.pinned:
- self._tab_close_prompt_if_pinned(
+ CommandDispatcher.tab_close_prompt_if_pinned(
tab, force,
lambda: self.tab_only(
prev=prev, next_=next_, force=True))