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()
|
@pyqtSlot()
|
||||||
def on_cur_load_started(self):
|
def on_cur_load_started(self):
|
||||||
"""Leave insert/hint mode when loading started."""
|
"""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',
|
if config.instance.get('input.insert_mode.leave_on_load',
|
||||||
url=self.current_url()):
|
url=url):
|
||||||
modeman.leave(self._win_id, usertypes.KeyMode.insert,
|
modeman.leave(self._win_id, usertypes.KeyMode.insert,
|
||||||
'load started', maybe=True)
|
'load started', maybe=True)
|
||||||
modeman.leave(self._win_id, usertypes.KeyMode.hint,
|
|
||||||
'load started', maybe=True)
|
|
||||||
else:
|
else:
|
||||||
log.modes.debug("Ignoring leave_on_load request due to setting.")
|
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)
|
@pyqtSlot(browsertab.AbstractTab, str)
|
||||||
def on_title_changed(self, tab, text):
|
def on_title_changed(self, tab, text):
|
||||||
|
Loading…
Reference in New Issue
Block a user