Disallow caret mode with QtWebEngine
This commit is contained in:
parent
fd29528e4f
commit
d3f359e490
@ -265,10 +265,17 @@ class ModeManager(QObject):
|
|||||||
m = usertypes.KeyMode[mode]
|
m = usertypes.KeyMode[mode]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise cmdexc.CommandError("Mode {} does not exist!".format(mode))
|
raise cmdexc.CommandError("Mode {} does not exist!".format(mode))
|
||||||
|
|
||||||
|
backend = usertypes.arg2backend[objreg.get('args').backend]
|
||||||
if m in [usertypes.KeyMode.hint, usertypes.KeyMode.command,
|
if m in [usertypes.KeyMode.hint, usertypes.KeyMode.command,
|
||||||
usertypes.KeyMode.yesno, usertypes.KeyMode.prompt]:
|
usertypes.KeyMode.yesno, usertypes.KeyMode.prompt]:
|
||||||
raise cmdexc.CommandError(
|
raise cmdexc.CommandError(
|
||||||
"Mode {} can't be entered manually!".format(mode))
|
"Mode {} can't be entered manually!".format(mode))
|
||||||
|
elif (m == usertypes.KeyMode.caret and
|
||||||
|
backend == usertypes.Backend.QtWebEngine):
|
||||||
|
raise cmdexc.CommandError("Caret mode is not supported with "
|
||||||
|
"QtWebEngine yet.")
|
||||||
|
|
||||||
self.enter(m, 'command')
|
self.enter(m, 'command')
|
||||||
|
|
||||||
@pyqtSlot(usertypes.KeyMode, str, bool)
|
@pyqtSlot(usertypes.KeyMode, str, bool)
|
||||||
|
Loading…
Reference in New Issue
Block a user