From 96fc0a6cd5248049dd16d4effb6978a929c748f4 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Tue, 12 Jul 2022 15:26:58 +0100 Subject: [PATCH] Fix a merge issue --- rich/console.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/rich/console.py b/rich/console.py index 50f0c743..5f84dd31 100644 --- a/rich/console.py +++ b/rich/console.py @@ -1972,19 +1972,15 @@ class Console: with self._lock: if self.record: with self._record_buffer_lock: - self._record_buffer.extend(self._buffer[:]) + self._record_buffer.extend( + [ + segment + for segment in self._buffer[:] + if not isinstance(segment, _NonRecordedSegment) + ] + ) if self._buffer_index == 0: - if self.record: - with self._record_buffer_lock: - self._record_buffer.extend( - [ - segment - for segment in self._buffer[:] - if not isinstance(segment, _NonRecordedSegment) - ] - ) - if self.is_jupyter: # pragma: no cover from .jupyter import display