Always leave hint mode
- Also handle invalid URLs properly through catching the QtValueError
This commit is contained in:
parent
3d5caba7d4
commit
0e327c4ec4
@ -584,14 +584,18 @@ class TabbedBrowser(QWidget):
|
||||
@pyqtSlot()
|
||||
def on_cur_load_started(self):
|
||||
"""Leave insert/hint mode when loading started."""
|
||||
try:
|
||||
url = self.current_url()
|
||||
except qtutils.QtValueError:
|
||||
url = None
|
||||
if config.instance.get('input.insert_mode.leave_on_load',
|
||||
url=self.current_url()):
|
||||
url=url):
|
||||
modeman.leave(self._win_id, usertypes.KeyMode.insert,
|
||||
'load started', maybe=True)
|
||||
modeman.leave(self._win_id, usertypes.KeyMode.hint,
|
||||
'load started', maybe=True)
|
||||
else:
|
||||
log.modes.debug("Ignoring leave_on_load request due to setting.")
|
||||
modeman.leave(self._win_id, usertypes.KeyMode.hint,
|
||||
'load started', maybe=True)
|
||||
|
||||
@pyqtSlot(browsertab.AbstractTab, str)
|
||||
def on_title_changed(self, tab, text):
|
||||
|
Loading…
Reference in New Issue
Block a user