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 33d974c commit 7c25ab5Copy full SHA for 7c25ab5
src/textual/content.py
@@ -385,8 +385,8 @@ def get_optimal_width(
385
A width in cells.
386
387
"""
388
- lines = self.without_spans.split("\n")
389
- return max(line.cell_length for line in lines)
+ width = max(cell_len(line) for line in self.plain.split("\n"))
+ return width
390
391
def get_height(self, rules: RulesMap, width: int) -> int:
392
"""Get the height of the Visual if rendered at the given width.
0 commit comments