← oracle_full

rich_3470

resolved RESOLVED UNSUBMITTED PASS · None tool calls · 0 s · Textualize/rich

Task input

Fix record and capture

Fix https://github.com/Textualize/rich/issues/2563

Tool calls (0)

#ToolArgumentsResult
No trace captured.

Patch

--- a/rich/console.py
+++ b/rich/console.py
@@ -2029,7 +2029,7 @@ def _write_buffer(self) -> None:
         """Write the buffer to the output file."""
 
         with self._lock:
-            if self.record:
+            if self.record and not self._buffer_index:
                 with self._record_buffer_lock:
                     self._record_buffer.extend(self._buffer[:])
 

Test output

show
........................................................................ [ 73%]
..........................                                               [100%]
98 passed in 0.71s