diff --git a/qutebrowser/completion/completer.py b/qutebrowser/completion/completer.py index efd6b3490..23c77b59a 100644 --- a/qutebrowser/completion/completer.py +++ b/qutebrowser/completion/completer.py @@ -196,6 +196,8 @@ class Completer(QObject): For performance reasons we don't want to block here, instead we do this in the background. + + We delay the update only if we've already input some text. """ if (self._cmd.cursorPosition() == self._last_cursor_pos and self._cmd.text() == self._last_text): @@ -203,7 +205,7 @@ class Completer(QObject): "changes.") else: log.completion.debug("Scheduling completion update.") - self._timer.start() + self._timer.start(config.val.completion.delay if self._last_text else 0) self._last_cursor_pos = self._cmd.cursorPosition() self._last_text = self._cmd.text() diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index f500a2f0f..71ab4c8b0 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -656,6 +656,13 @@ completion.web_history_max_items: 0: no history / -1: unlimited +completion.delay: + default: 0 + type: + name: Int + minval: 0 + desc: Delay in ms before updating completions after typing a character + ## downloads downloads.location.directory: