Make it possible to enter a keymode twice.
If we don't allow this, we can get stuck e.g. when doing this: - Press m to get a quickmark prompt. - Click a javascript prompt button. - Exit the javascript prompt. - We have the quickmark prompt open but we're in normal mode.
This commit is contained in:
parent
7c86693dd4
commit
4ab5d2df28
@ -287,9 +287,6 @@ class ModeManager(QObject):
|
|||||||
mode, '' if reason is None else ' (reason: {})'.format(reason)))
|
mode, '' if reason is None else ' (reason: {})'.format(reason)))
|
||||||
if mode not in self._handlers:
|
if mode not in self._handlers:
|
||||||
raise ValueError("No handler for mode {}".format(mode))
|
raise ValueError("No handler for mode {}".format(mode))
|
||||||
if self.mode_stack and self.mode_stack[-1] == mode:
|
|
||||||
log.modes.debug("Already at end of stack, doing nothing")
|
|
||||||
return
|
|
||||||
self.mode_stack.append(mode)
|
self.mode_stack.append(mode)
|
||||||
log.modes.debug("New mode stack: {}".format(self.mode_stack))
|
log.modes.debug("New mode stack: {}".format(self.mode_stack))
|
||||||
self.entered.emit(mode, self._win_id)
|
self.entered.emit(mode, self._win_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user