From 5352054d09a43262f78ce30c0cbb42f459d4b662 Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Sat, 21 Mar 2026 17:30:08 -0700 Subject: [PATCH] fix(terminal): Fix vertical jumpiness by joining buffer lines with newlines The terminal display was using which concatenated lines without separators, causing text to render incorrectly and appear to jump vertically. Changed to so lines are properly separated with newlines, allowing the terminal to render each line on its own row. The ANSI cursor positioning codes (\033[row;colH) added by effects like HUD and firehose still work correctly because: 1. \033[H moves cursor to (1,1) and \033[J clears screen 2. Newlines move cursor down for subsequent lines 3. Cursor positioning codes override the newline positions 4. This allows effects to position content at specific rows while the base content flows naturally with newlines --- engine/display/backends/terminal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/display/backends/terminal.py b/engine/display/backends/terminal.py index a699e43..6f19d3d 100644 --- a/engine/display/backends/terminal.py +++ b/engine/display/backends/terminal.py @@ -110,7 +110,7 @@ class TerminalDisplay: buffer = render_border(buffer, self.width, self.height, fps, frame_time) # Write buffer with cursor home + erase down to avoid flicker - output = "\033[H\033[J" + "".join(buffer) + output = "\033[H\033[J" + "\n".join(buffer) sys.stdout.buffer.write(output.encode()) sys.stdout.flush()