From 7284b72396398213356577345151bd79e497d27c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 14:13:25 -0300 Subject: Paint a body with context rows once, into its layer, and join it joinBody replaces the second paint of a file body with compact tree-sitter context rows: the body is painted once into its body layer (more rows than the grid has) and the grid's body rows are copies of the layer's first ones; the rail is the grid's alone, from its region. Which rows are context rows is still decided by a text build before the paint, and a body without them reuses that text and paints straight onto the grid: every other body has no row the grid cannot show, so it gets no layer and no copy. Each part now paints only its own rows. The tag paints the tag rows of every pointer sweep that crosses them (the select sweep in the tag's colours, the look-hover affordance over it, a middle or right sweep over both in its button's tint), which the body used to paint over the tag on the grid alone; the body paints only body rows, and a select sweep begun on the tag marks the body rows it crossed before the text is laid down, as it did. Grid and layers agree, the snapshot goldens are byte-identical, and a test checks the joined grid rows and caret against a plain paint of the same body with the tag on top and at the bottom. The GUI goldens gain a terminal pane scene. --- test/gui_golden.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/gui_golden.py') diff --git a/test/gui_golden.py b/test/gui_golden.py index 1252014c..327911cc 100644 --- a/test/gui_golden.py +++ b/test/gui_golden.py @@ -188,6 +188,14 @@ def run(args): scene('15-theme-acme-light') client.write('/ctl', b'Debug\n') scene('16-debug') + client.write('/ctl', b'Debug\n') + # A terminal pane: raw rows, ANSI colours, a hidden prompt. + before = set(panes(client)) + client.write(f'/pane/{first}/exec', b'Tty\n') + terminal = require(wait_for(lambda: next((s for s in panes(client) if s not in before), None)), 'Tty missing') + client.write(f'/pane/{terminal}/pty/data', b"PS1='$ '; clear; printf '\\033[1;36mcolour\\033[0m plain \\033[32mgreen\\033[0m\\n'\r") + require(wait_for(lambda: b'green' in client.read(f'/pane/{terminal}/body')), 'terminal output missing') + scene('17-terminal') lines = ''.join(f'{label} {digest}\n' for label, digest in results) if args.update: GOLDENS.write_text(lines) -- cgit v1.3