summaryrefslogtreecommitdiff
path: root/qutebrowser/commands
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2019-10-13 14:23:30 +0200
committerFlorian Bruhin <me@the-compiler.org>2019-10-13 18:38:07 +0200
commit42a91a184d971d7f2c894411550fd751ff1d3e80 (patch)
tree0b02ff489835e2c6919a283213211ca88c06fc49 /qutebrowser/commands
parent8dafc5658343d7e96e5aff6cb96aedf989174b2b (diff)
downloadqutebrowser-42a91a184d971d7f2c894411550fd751ff1d3e80.tar.gz
qutebrowser-42a91a184d971d7f2c894411550fd751ff1d3e80.zip
objreg: Make it possible to register objects for commands only
This is intended as a stop-gap solution to get things out of objreg - we can now get things out gradually, and as the last step, take care of commands. See #640
Diffstat (limited to 'qutebrowser/commands')
-rw-r--r--qutebrowser/commands/command.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/qutebrowser/commands/command.py b/qutebrowser/commands/command.py
index 1dc1c7797..952e1c340 100644
--- a/qutebrowser/commands/command.py
+++ b/qutebrowser/commands/command.py
@@ -359,7 +359,8 @@ class Command:
tab_id = None
else:
raise ValueError("Invalid scope {}!".format(scope))
- return objreg.get(name, scope=scope, window=win_id, tab=tab_id)
+ return objreg.get(name, scope=scope, window=win_id, tab=tab_id,
+ from_command=True)
def _add_special_arg(self, *, value, param, args, kwargs):
"""Add a special argument value to a function call.