diff options
author | Ivan Blinkov <ivan@blinkov.ru> | 2022-02-10 16:47:10 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:10 +0300 |
commit | 1aeb9a455974457866f78722ad98114bafc84e8a (patch) | |
tree | e4340eaf1668684d83a0a58c36947c5def5350ad /contrib/python/prompt-toolkit/py2/prompt_toolkit/key_binding/vi_state.py | |
parent | bd5ef432f5cfb1e18851381329d94665a4c22470 (diff) | |
download | ydb-1aeb9a455974457866f78722ad98114bafc84e8a.tar.gz |
Restoring authorship annotation for Ivan Blinkov <ivan@blinkov.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/prompt-toolkit/py2/prompt_toolkit/key_binding/vi_state.py')
-rw-r--r-- | contrib/python/prompt-toolkit/py2/prompt_toolkit/key_binding/vi_state.py | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/contrib/python/prompt-toolkit/py2/prompt_toolkit/key_binding/vi_state.py b/contrib/python/prompt-toolkit/py2/prompt_toolkit/key_binding/vi_state.py index 92ce3cbd29..c6e3e366b0 100644 --- a/contrib/python/prompt-toolkit/py2/prompt_toolkit/key_binding/vi_state.py +++ b/contrib/python/prompt-toolkit/py2/prompt_toolkit/key_binding/vi_state.py @@ -1,34 +1,34 @@ -from __future__ import unicode_literals - -__all__ = ( - 'InputMode', - 'CharacterFind', - 'ViState', -) - - -class InputMode(object): - INSERT = 'vi-insert' +from __future__ import unicode_literals + +__all__ = ( + 'InputMode', + 'CharacterFind', + 'ViState', +) + + +class InputMode(object): + INSERT = 'vi-insert' INSERT_MULTIPLE = 'vi-insert-multiple' - NAVIGATION = 'vi-navigation' - REPLACE = 'vi-replace' - - -class CharacterFind(object): - def __init__(self, character, backwards=False): - self.character = character - self.backwards = backwards - - -class ViState(object): - """ - Mutable class to hold the state of the Vi navigation. - """ - def __init__(self): - #: None or CharacterFind instance. (This is used to repeat the last - #: search in Vi mode, by pressing the 'n' or 'N' in navigation mode.) - self.last_character_find = None - + NAVIGATION = 'vi-navigation' + REPLACE = 'vi-replace' + + +class CharacterFind(object): + def __init__(self, character, backwards=False): + self.character = character + self.backwards = backwards + + +class ViState(object): + """ + Mutable class to hold the state of the Vi navigation. + """ + def __init__(self): + #: None or CharacterFind instance. (This is used to repeat the last + #: search in Vi mode, by pressing the 'n' or 'N' in navigation mode.) + self.last_character_find = None + # When an operator is given and we are waiting for text object, # -- e.g. in the case of 'dw', after the 'd' --, an operator callback # is set here. @@ -39,9 +39,9 @@ class ViState(object): #: :class:`ClipboardData` instances. self.named_registers = {} - #: The Vi mode we're currently in to. - self.input_mode = InputMode.INSERT - + #: The Vi mode we're currently in to. + self.input_mode = InputMode.INSERT + #: Waiting for digraph. self.waiting_for_digraph = False self.digraph_symbol1 = None # (None or a symbol.) @@ -53,7 +53,7 @@ class ViState(object): """ Reset state, go back to the given mode. INSERT by default. """ - # Go back to insert mode. + # Go back to insert mode. self.input_mode = mode self.waiting_for_digraph = False |