| 687 | self.right_crop(length - new_length) |
| 688 | |
| 689 | def __rich_console__( |
| 690 | self, console: "Console", options: "ConsoleOptions" |
| 691 | ) -> Iterable[Segment]: |
| 692 | tab_size: int = console.tab_size if self.tab_size is None else self.tab_size |
| 693 | justify = self.justify or options.justify or DEFAULT_JUSTIFY |
| 694 | overflow = self.overflow or options.overflow or DEFAULT_OVERFLOW |
| 695 | |
| 696 | lines = self.wrap( |
| 697 | console, |
| 698 | options.max_width, |
| 699 | justify=justify, |
| 700 | overflow=overflow, |
| 701 | tab_size=tab_size or 8, |
| 702 | no_wrap=pick_bool(self.no_wrap, options.no_wrap, False), |
| 703 | ) |
| 704 | all_lines = Text("\n").join(lines) |
| 705 | yield from all_lines.render(console, end=self.end) |
| 706 | |
| 707 | def __rich_measure__( |
| 708 | self, console: "Console", options: "ConsoleOptions" |