Double-check url is valid in leave_on_load

This commit is contained in:
Jay Kamat 2019-02-22 21:55:11 -08:00
parent 961a4b206c
commit afed360f16
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5

View File

@ -588,6 +588,8 @@ class TabbedBrowser(QWidget):
"""Leave insert/hint mode when loading started.""" """Leave insert/hint mode when loading started."""
try: try:
url = self.current_url() url = self.current_url()
if not url.isValid():
url = None
except qtutils.QtValueError: except qtutils.QtValueError:
url = None url = None
if config.instance.get('input.insert_mode.leave_on_load', if config.instance.get('input.insert_mode.leave_on_load',