diff options
author | Nikita Slyusarev <nslus@yandex-team.com> | 2022-02-10 16:46:52 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:52 +0300 |
commit | cd77cecfc03a3eaf87816af28a33067c4f0cdb59 (patch) | |
tree | 1308e0bae862d52e0020d881fe758080437fe389 /contrib/python/prompt-toolkit/py2/prompt_toolkit/layout/screen.py | |
parent | cdae02d225fb5b3afbb28990e79a7ac6c9125327 (diff) | |
download | ydb-cd77cecfc03a3eaf87816af28a33067c4f0cdb59.tar.gz |
Restoring authorship annotation for Nikita Slyusarev <nslus@yandex-team.com>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/prompt-toolkit/py2/prompt_toolkit/layout/screen.py')
-rw-r--r-- | contrib/python/prompt-toolkit/py2/prompt_toolkit/layout/screen.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/python/prompt-toolkit/py2/prompt_toolkit/layout/screen.py b/contrib/python/prompt-toolkit/py2/prompt_toolkit/layout/screen.py index 95561f5de7..3e66f26500 100644 --- a/contrib/python/prompt-toolkit/py2/prompt_toolkit/layout/screen.py +++ b/contrib/python/prompt-toolkit/py2/prompt_toolkit/layout/screen.py @@ -1,9 +1,9 @@ from __future__ import unicode_literals -from prompt_toolkit.cache import FastDictCache -from prompt_toolkit.token import Token +from prompt_toolkit.cache import FastDictCache +from prompt_toolkit.token import Token from prompt_toolkit.utils import get_cwidth - + from collections import defaultdict, namedtuple __all__ = ( @@ -61,7 +61,7 @@ class Char(object): '\x1c': '^\\', '\x1d': '^]', '\x1f': '^_', - '\x7f': '^?', # Backspace + '\x7f': '^?', # Backspace } def __init__(self, char=' ', token=Token): @@ -87,7 +87,7 @@ class Char(object): return '%s(%r, %r)' % (self.__class__.__name__, self.char, self.token) -_CHAR_CACHE = FastDictCache(Char, size=1000 * 1000) +_CHAR_CACHE = FastDictCache(Char, size=1000 * 1000) Transparent = Token.Transparent @@ -97,13 +97,13 @@ class Screen(object): """ def __init__(self, default_char=None, initial_width=0, initial_height=0): if default_char is None: - default_char = _CHAR_CACHE[' ', Transparent] + default_char = _CHAR_CACHE[' ', Transparent] self.data_buffer = defaultdict(lambda: defaultdict(lambda: default_char)) - #: Escape sequences to be injected. - self.zero_width_escapes = defaultdict(lambda: defaultdict(lambda: '')) - + #: Escape sequences to be injected. + self.zero_width_escapes = defaultdict(lambda: defaultdict(lambda: '')) + #: Position of the cursor. self.cursor_position = Point(y=0, x=0) |