diff options
author | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
---|---|---|
committer | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
commit | 06e5c21a835c0e923506c4ff27929f34e00761c2 (patch) | |
tree | 75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/emacs_state.py | |
parent | 03f024c4412e3aa613bb543cf1660176320ba8f4 (diff) | |
download | ydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz |
fix ya.make
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/emacs_state.py')
-rw-r--r-- | contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/emacs_state.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/emacs_state.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/emacs_state.py deleted file mode 100644 index 4c996224a0..0000000000 --- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/emacs_state.py +++ /dev/null @@ -1,36 +0,0 @@ -from typing import List, Optional - -from .key_processor import KeyPress - -__all__ = [ - "EmacsState", -] - - -class EmacsState: - """ - Mutable class to hold Emacs specific state. - """ - - def __init__(self) -> None: - # Simple macro recording. (Like Readline does.) - # (For Emacs mode.) - self.macro: Optional[List[KeyPress]] = [] - self.current_recording: Optional[List[KeyPress]] = None - - def reset(self) -> None: - self.current_recording = None - - @property - def is_recording(self) -> bool: - "Tell whether we are recording a macro." - return self.current_recording is not None - - def start_macro(self) -> None: - "Start recording macro." - self.current_recording = [] - - def end_macro(self) -> None: - "End recording macro." - self.macro = self.current_recording - self.current_recording = None |