Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Feb 27, 2021
1 parent f6d6f73 commit 330ef6d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rich/padding.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,13 @@ def __rich_console__(
+ self.right,
options.max_width,
)
child_options = options.update_width(width - self.left - self.right)
lines = console.render_lines(
self.renderable, child_options, style=style, pad=False
self.renderable,
options.update_width(width - self.left - self.right),
style=style,
pad=True,
)
_Segment = Segment
lines = _Segment.set_shape(lines, child_options.max_width, style=style)

left = _Segment(" " * self.left, style) if self.left else None
right = _Segment(" " * self.right, style) if self.right else None
Expand Down

0 comments on commit 330ef6d

Please sign in to comment.