diff --git a/qutebrowser/completion/completionwidget.py b/qutebrowser/completion/completionwidget.py index 7177f1897..6e83e6fee 100644 --- a/qutebrowser/completion/completionwidget.py +++ b/qutebrowser/completion/completionwidget.py @@ -199,6 +199,9 @@ class CompletionView(QTreeView): return idx = self._next_idx(prev) + if not idx.isValid(): + return + selmodel.setCurrentIndex( idx, QItemSelectionModel.ClearAndSelect | QItemSelectionModel.Rows)