diff --git a/qutebrowser/commands/command.py b/qutebrowser/commands/command.py index 96fa2aabb..d9a5d9057 100644 --- a/qutebrowser/commands/command.py +++ b/qutebrowser/commands/command.py @@ -65,7 +65,6 @@ class Command: SpecialParams = collections.namedtuple('SpecialParams', ['count', 'win_id']) - def __init__(self, name, split, hide, instance, completion, modes, not_modes, needs_js, is_debug, ignore_args, handler, scope): diff --git a/qutebrowser/utils/utilcmds.py b/qutebrowser/utils/utilcmds.py index 575a892d7..9bc7b9054 100644 --- a/qutebrowser/utils/utilcmds.py +++ b/qutebrowser/utils/utilcmds.py @@ -113,8 +113,8 @@ def debug_cache_stats(): def debug_console(): """Show the debugging console.""" try: - debug_console = objreg.get('debug-console') + con_widget = objreg.get('debug-console') except KeyError: - debug_console = console.ConsoleWidget() - objreg.register('debug-console', debug_console) - debug_console.show() + con_widget = console.ConsoleWidget() + objreg.register('debug-console', con_widget) + con_widget.show() diff --git a/qutebrowser/widgets/console.py b/qutebrowser/widgets/console.py index e55fec0c7..f004cd188 100644 --- a/qutebrowser/widgets/console.py +++ b/qutebrowser/widgets/console.py @@ -75,10 +75,11 @@ class ConsoleLineEdit(misc.CommandLineEdit): @pyqtSlot(str) def on_text_changed(self, text): + """Update completion when text changed.""" strings = set() i = 0 while True: - s = self._rlcompleter.complete(self.text(), i) + s = self._rlcompleter.complete(text, i) if s is None: break else: @@ -216,6 +217,7 @@ class ConsoleWidget(QWidget): return utils.get_repr(self, visible=self.isVisible()) def write(self, line): + """Write a line of text (without added newline) to the output.""" self._output.append_text(line) @pyqtSlot(str)