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/selection.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/selection.py')
-rw-r--r-- | contrib/python/prompt-toolkit/py2/prompt_toolkit/selection.py | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/contrib/python/prompt-toolkit/py2/prompt_toolkit/selection.py b/contrib/python/prompt-toolkit/py2/prompt_toolkit/selection.py index 6582921222..a71211bff8 100644 --- a/contrib/python/prompt-toolkit/py2/prompt_toolkit/selection.py +++ b/contrib/python/prompt-toolkit/py2/prompt_toolkit/selection.py @@ -1,47 +1,47 @@ -""" -Data structures for the selection. -""" -from __future__ import unicode_literals - -__all__ = ( - 'SelectionType', +""" +Data structures for the selection. +""" +from __future__ import unicode_literals + +__all__ = ( + 'SelectionType', 'PasteMode', - 'SelectionState', -) - - -class SelectionType(object): - """ - Type of selection. - """ - #: Characters. (Visual in Vi.) + 'SelectionState', +) + + +class SelectionType(object): + """ + Type of selection. + """ + #: Characters. (Visual in Vi.) CHARACTERS = 'CHARACTERS' - - #: Whole lines. (Visual-Line in Vi.) + + #: Whole lines. (Visual-Line in Vi.) LINES = 'LINES' - - #: A block selection. (Visual-Block in Vi.) + + #: A block selection. (Visual-Block in Vi.) BLOCK = 'BLOCK' - - + + class PasteMode(object): EMACS = 'EMACS' # Yank like emacs. VI_AFTER = 'VI_AFTER' # When pressing 'p' in Vi. VI_BEFORE = 'VI_BEFORE' # When pressing 'P' in Vi. -class SelectionState(object): - """ - State of the current selection. - - :param original_cursor_position: int - :param type: :class:`~.SelectionType` - """ - def __init__(self, original_cursor_position=0, type=SelectionType.CHARACTERS): - self.original_cursor_position = original_cursor_position - self.type = type - - def __repr__(self): - return '%s(original_cursor_position=%r, type=%r)' % ( - self.__class__.__name__, - self.original_cursor_position, self.type) +class SelectionState(object): + """ + State of the current selection. + + :param original_cursor_position: int + :param type: :class:`~.SelectionType` + """ + def __init__(self, original_cursor_position=0, type=SelectionType.CHARACTERS): + self.original_cursor_position = original_cursor_position + self.type = type + + def __repr__(self): + return '%s(original_cursor_position=%r, type=%r)' % ( + self.__class__.__name__, + self.original_cursor_position, self.type) |