diff --git a/qutebrowser/mainwindow/statusbar/command.py b/qutebrowser/mainwindow/statusbar/command.py index dc1df34c2..61b9fb43a 100644 --- a/qutebrowser/mainwindow/statusbar/command.py +++ b/qutebrowser/mainwindow/statusbar/command.py @@ -19,6 +19,8 @@ """The commandline in the statusbar.""" +import functools + from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QSize from PyQt5.QtWidgets import QSizePolicy @@ -69,10 +71,12 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit): self.textChanged.connect(self.updateGeometry) self.textChanged.connect(self._incremental_search) - search_fn = cmdutils.cmd_dict['search'].run + dispatcher = objreg.get('command-dispatcher', + scope='window', window=self._win_id) + search_fn = dispatcher.search self.search_prefixes = { - '/': lambda search: search_fn(self._win_id, ["--", search]), - '?': lambda search: search_fn(self._win_id, ["-r", "--", search]), + '/': search_fn, + '?': functools.partial(search_fn, reverse=True) } def prefix(self):