Merge branch 'blyxxyz-enter-mode-blacklist'
This commit is contained in:
commit
f4989a3bb3
@ -36,6 +36,7 @@ Fixed
|
|||||||
- Worked around a segfault with Qt 5.8 when closing a tab with a search active
|
- Worked around a segfault with Qt 5.8 when closing a tab with a search active
|
||||||
- Fixed various mouse actions (like automatically entering insert mode) not working with Qt 5.8
|
- Fixed various mouse actions (like automatically entering insert mode) not working with Qt 5.8
|
||||||
- Fixed hints sometimes not working with Qt 5.8
|
- Fixed hints sometimes not working with Qt 5.8
|
||||||
|
- `:enter-mode` now refuses to enter modes which can't be entered manually (which caused crashes).
|
||||||
|
|
||||||
v0.9.1
|
v0.9.1
|
||||||
------
|
------
|
||||||
|
@ -265,6 +265,10 @@ 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))
|
||||||
|
if m in [usertypes.KeyMode.hint, usertypes.KeyMode.command,
|
||||||
|
usertypes.KeyMode.yesno, usertypes.KeyMode.prompt]:
|
||||||
|
raise cmdexc.CommandError(
|
||||||
|
"Mode {} can't be entered manually!".format(mode))
|
||||||
self.enter(m, 'command')
|
self.enter(m, 'command')
|
||||||
|
|
||||||
@pyqtSlot(usertypes.KeyMode, str, bool)
|
@pyqtSlot(usertypes.KeyMode, str, bool)
|
||||||
|
@ -635,3 +635,9 @@ Feature: Various utility commands.
|
|||||||
And I run :command-accept
|
And I run :command-accept
|
||||||
And I set general -> private-browsing to false
|
And I set general -> private-browsing to false
|
||||||
Then the message "blah" should be shown
|
Then the message "blah" should be shown
|
||||||
|
|
||||||
|
## Modes blacklisted for :enter-mode
|
||||||
|
|
||||||
|
Scenario: Trying to enter command mode with :enter-mode
|
||||||
|
When I run :enter-mode command
|
||||||
|
Then the error "Mode command can't be entered manually!" should be shown
|
||||||
|
Loading…
Reference in New Issue
Block a user