diff options
author | Nikita Slyusarev <nslus@yandex-team.com> | 2022-02-10 16:46:53 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:53 +0300 |
commit | 469afdc4e2587bf62ecdd096b75a0baa444c4012 (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /contrib/python/prompt-toolkit/py2/prompt_toolkit/layout/screen.py | |
parent | cd77cecfc03a3eaf87816af28a33067c4f0cdb59 (diff) | |
download | ydb-469afdc4e2587bf62ecdd096b75a0baa444c4012.tar.gz |
Restoring authorship annotation for Nikita Slyusarev <nslus@yandex-team.com>. Commit 2 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 3e66f26500..95561f5de7 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) |