When capturing on a Console with recording enabled, everything printed to the console seems to get duplicated in the recorded output (but the output of the capture is fine).
An example:
from rich.console import Console
console = Console(record=True)
with console.capture() as capture:
console.print("The first line")
console.print("The second line")
console.print("And the third line")
export = console.export_text()
cap = capture.get()
The value of "export" is:
The first line
The first line
The second line
The first line
The second line
And the third line
While "cap" is:
The first line
The second line
And the third line
It seems that each time I call console.print() it duplicates the whole contents of the buffer.
Is there maybe a step that I've missed here in setting up recording?
Describe the bug
When capturing on a Console with recording enabled, everything printed to the console seems to get duplicated in the recorded output (but the output of the capture is fine).
An example:
The value of "export" is:
While "cap" is:
It seems that each time I call console.print() it duplicates the whole contents of the buffer.
Is there maybe a step that I've missed here in setting up recording?
Platform
Click to expand
Tried this on Windows 10 and Linux Ubuntu 20.04, using PowerShell and cmd through Windows Terminal. Python 3.11.4 and Rich 13.5.2. Output of rich.diagnose: ``` ╭─────────────────────────