diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-28 14:46:28 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-28 14:46:28 +0300 |
commit | 86568a9d1590ec529af95a7e16fb889b09162ed9 (patch) | |
tree | dbad39b76dcca72fd5551a0f782f6ad2a2bcd199 /contrib/python/prompt-toolkit/py3/prompt_toolkit/widgets | |
parent | e6eedf7496d3741c2226a52ac25b12851b331112 (diff) | |
download | ydb-86568a9d1590ec529af95a7e16fb889b09162ed9.tar.gz |
intermediate changes
ref:8cc96053e249b790770c75de97ccbea86351cff2
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/prompt_toolkit/widgets')
-rw-r--r-- | contrib/python/prompt-toolkit/py3/prompt_toolkit/widgets/base.py | 6 | ||||
-rw-r--r-- | contrib/python/prompt-toolkit/py3/prompt_toolkit/widgets/toolbars.py | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/widgets/base.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/widgets/base.py index 885d23a889..bd2d332209 100644 --- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/widgets/base.py +++ b/contrib/python/prompt-toolkit/py3/prompt_toolkit/widgets/base.py @@ -344,6 +344,9 @@ class Label: dont_extend_height: bool = True, dont_extend_width: bool = False, align: Union[WindowAlign, Callable[[], WindowAlign]] = WindowAlign.LEFT, + # There is no cursor navigation in a label, so it makes sense to always + # wrap lines by default. + wrap_lines: FilterOrBool = True, ) -> None: self.text = text @@ -370,6 +373,7 @@ class Label: dont_extend_height=dont_extend_height, dont_extend_width=dont_extend_width, align=align, + wrap_lines=wrap_lines, ) def __pt_container__(self) -> Container: @@ -888,7 +892,7 @@ class Checkbox(CheckboxList[str]): def __init__(self, text: AnyFormattedText = "", checked: bool = False) -> None: values = [("value", text)] - CheckboxList.__init__(self, values=values) + super().__init__(values=values) self.checked = checked @property diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/widgets/toolbars.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/widgets/toolbars.py index e464be04ac..402ecaa982 100644 --- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/widgets/toolbars.py +++ b/contrib/python/prompt-toolkit/py3/prompt_toolkit/widgets/toolbars.py @@ -152,7 +152,7 @@ class SystemToolbar: async def _accept_vi(event: E) -> None: "Run system command." event.app.vi_state.input_mode = InputMode.NAVIGATION - event.app.run_system_command( + await event.app.run_system_command( self.system_buffer.text, display_before_text=self._get_display_before_text(), ) |