summaryrefslogtreecommitdiff
path: root/qutebrowser/components/readlinecommands.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/components/readlinecommands.py')
-rw-r--r--qutebrowser/components/readlinecommands.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/qutebrowser/components/readlinecommands.py b/qutebrowser/components/readlinecommands.py
index ea8f12edf..44772f10f 100644
--- a/qutebrowser/components/readlinecommands.py
+++ b/qutebrowser/components/readlinecommands.py
@@ -39,7 +39,11 @@ class _ReadlineBridge:
def _widget(self) -> Optional[QLineEdit]:
"""Get the currently active QLineEdit."""
- w = QApplication.instance().focusWidget()
+ # FIXME add this to api.utils or so
+ qapp = QApplication.instance()
+ assert qapp is not None
+ w = qapp.focusWidget()
+
if isinstance(w, QLineEdit):
return w
else: