File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,14 @@ def _(event):
47
47
"""
48
48
event .app .renderer .clear ()
49
49
50
+ @handle ('c-z' )
51
+ def _ (event ):
52
+ """
53
+ Suspend.
54
+ """
55
+ if python_input .enable_system_bindings :
56
+ event .app .suspend_to_background ()
57
+
50
58
@handle ('f2' )
51
59
def _ (event ):
52
60
"""
Original file line number Diff line number Diff line change 9
9
from prompt_toolkit .auto_suggest import AutoSuggestFromHistory , ConditionalAutoSuggest , ThreadedAutoSuggest
10
10
from prompt_toolkit .buffer import Buffer
11
11
from prompt_toolkit .key_binding .bindings .auto_suggest import load_auto_suggest_bindings
12
+ from prompt_toolkit .key_binding .bindings .open_in_editor import load_open_in_editor_bindings
12
13
from prompt_toolkit .completion import ThreadedCompleter
13
14
from prompt_toolkit .document import Document
14
15
from prompt_toolkit .enums import DEFAULT_BUFFER , EditingMode
@@ -564,6 +565,9 @@ def _create_application(self):
564
565
load_auto_suggest_bindings (),
565
566
load_sidebar_bindings (self ),
566
567
load_confirm_exit_bindings (self ),
568
+ ConditionalKeyBindings (
569
+ load_open_in_editor_bindings (),
570
+ Condition (lambda : self .enable_open_in_editor )),
567
571
# Extra key bindings should not be active when the sidebar is visible.
568
572
ConditionalKeyBindings (
569
573
self .extra_key_bindings ,
You can’t perform that action at this time.
0 commit comments