diff options
author | Jonathan Slenders <jonathan@slenders.be> | 2016-05-22 11:23:30 +0200 |
---|---|---|
committer | Jonathan Slenders <jonathan@slenders.be> | 2016-05-22 11:23:30 +0200 |
commit | 1262bb62dbcb23e109f19a5573a06af234ae0c75 (patch) | |
tree | f36ab5cf8c3828db2dafc4964bd75cc68718998b | |
parent | 121195f1b11a381c279d8f59353918c2afa4889c (diff) |
Bug fix in key bindings: only activate Emacs system/open-in-editor bindings if editing_mode is emacs.
-rw-r--r-- | prompt_toolkit/key_binding/bindings/emacs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/prompt_toolkit/key_binding/bindings/emacs.py b/prompt_toolkit/key_binding/bindings/emacs.py index e409531c..ba2358cf 100644 --- a/prompt_toolkit/key_binding/bindings/emacs.py +++ b/prompt_toolkit/key_binding/bindings/emacs.py @@ -469,7 +469,7 @@ def load_emacs_open_in_editor_bindings(registry, filter=None): """ Pressing C-X C-E will open the buffer in an external editor. """ - handle = create_handle_decorator(registry, filter) + handle = create_handle_decorator(registry, filter & EmacsMode()) has_selection = HasSelection() @handle(Keys.ControlX, Keys.ControlE, filter= ~has_selection) @@ -481,7 +481,7 @@ def load_emacs_open_in_editor_bindings(registry, filter=None): def load_emacs_system_bindings(registry, filter=None): - handle = create_handle_decorator(registry, filter) + handle = create_handle_decorator(registry, filter & EmacsMode()) has_focus = HasFocus(SYSTEM_BUFFER) @handle(Keys.Escape, '!', filter= ~has_focus) |