Skip to content

Commit cd337e5

Browse files
committed
Fix output spacing logic in console tab layout
1 parent 8231811 commit cd337e5

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

euporie/console/tabs/console.py

+7-9
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,7 @@ def echo_layout(self, render_queue: list) -> Layout:
404404
if ((json_cells and cell.id != json_cells[0].id) or i > 0) and (
405405
(height_known and rows_above_layout > 0) or not height_known
406406
):
407-
children.append(
408-
Window(
409-
height=1,
410-
dont_extend_height=True,
411-
)
412-
)
407+
children.append(Window(height=1, dont_extend_height=True))
413408

414409
# Cell input
415410
children.append(
@@ -441,9 +436,12 @@ def echo_layout(self, render_queue: list) -> Layout:
441436
if outputs := cell.outputs:
442437
# Add space before an output if last rendered cell did not have outputs
443438
# or we are rendering a new output
444-
if self.last_rendered is not None and (
445-
not self.last_rendered.outputs
446-
or cell.execution_count != self.last_rendered.execution_count
439+
if self.last_rendered is None or (
440+
self.last_rendered is not None
441+
and (
442+
not self.last_rendered.outputs
443+
or cell.execution_count != self.last_rendered.execution_count
444+
)
447445
):
448446
children.append(
449447
Window(

0 commit comments

Comments
 (0)