We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58e14f4 commit 7dbc58eCopy full SHA for 7dbc58e
src/prompt_toolkit/widgets/base.py
@@ -436,12 +436,12 @@ def get_style() -> str:
436
)
437
438
def _get_text_fragments(self) -> StyleAndTextTuples:
439
- width = self.width - (
440
- get_cwidth(self.left_symbol) + get_cwidth(self.right_symbol)
441
- ) + (
442
- len(self.text) - get_cwidth(self.text)
+ width = (
+ self.width
+ - (get_cwidth(self.left_symbol) + get_cwidth(self.right_symbol))
+ + (len(self.text) - get_cwidth(self.text))
443
444
- text = (f"{{:^{max(0,width)}}}").format(self.text)
+ text = (f"{{:^{max(0, width)}}}").format(self.text)
445
446
def handler(mouse_event: MouseEvent) -> None:
447
if (
0 commit comments