Skip to content

Commit 5819bb1

Browse files
committed
Use the rendered title length for tab size calculation in Console.log()
1 parent 04b236b commit 5819bb1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/xulbux/console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def log(
524524
px, mx = " " * title_px, " " * title_mx
525525

526526
# TITLE LENGTH INCLUDING PADDING AND MARGIN
527-
title_len: int = len(title) + (title_px * 2) + (title_mx * 2)
527+
title_len: int = len(FormatCodes.remove(title)) + (title_px * 2) + (title_mx * 2)
528528

529529
# CALCULATE DISTANCE TO NEXT TAB STOP
530530
tab: str = " " * (-title_len % tab_size)

0 commit comments

Comments
 (0)