We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f31416 commit 465ab02Copy full SHA for 465ab02
src/prompt_toolkit/key_binding/bindings/emacs.py
@@ -38,6 +38,11 @@ def is_returnable() -> bool:
38
return get_app().current_buffer.is_returnable
39
40
41
+@Condition
42
+def is_arg() -> bool:
43
+ return get_app().key_processor.arg == "-"
44
+
45
46
def load_emacs_bindings() -> KeyBindingsBase:
47
"""
48
Some e-macs extensions.
@@ -139,7 +144,7 @@ def _meta_dash(event: E) -> None:
139
144
if event._arg is None:
140
145
event.append_to_arg_count("-")
141
146
142
- @handle("-", filter=Condition(lambda: get_app().key_processor.arg == "-"))
147
+ @handle("-", filter=is_arg)
143
148
def _dash(event: E) -> None:
149
150
When '-' is typed again, after exactly '-' has been given as an
0 commit comments