Skip to content

[BUG] Table title always displays on the left when soft_wrap is TrueΒ #3948

@kmvanbrunt

Description

@kmvanbrunt

Describe the bug

As of Rich 14.3.0, when soft_wrap is True, then a table's title prints on the left, regardless of the title_justify value.

This code reproduces the issue.

from rich.console import Console
from rich.table import Table

table = Table(title="The Title", title_justify="center")
table.add_column("Column 1")
table.add_column("Column 2")

c = Console()
c.print(table)
c.print()
c.print(table, soft_wrap=True)

The second table should have its title centered.

Image

Platform

rich==14.3.1
Python 3.13.5
Debian 13.3
xfce4-terminal 1.1.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions