summaryrefslogtreecommitdiff
path: root/test/snapshots/wrap.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-05 18:02:16 -0300
committerGabriel Schneider <[email protected]>2026-08-10 09:17:07 -0300
commit4ecf494b3af0ec8d8212dd9614b7e7d329a2251f (patch)
tree5a60ea3d69c5fafa62cb259faf0b3a1f4cf85d9f /test/snapshots/wrap.snap
parent79a8980e46d8ed1f9ef7e3f4e44db7ee58e9f88e (diff)
downloadpardes-4ecf494b3af0ec8d8212dd9614b7e7d329a2251f.tar.gz
pardes-4ecf494b3af0ec8d8212dd9614b7e7d329a2251f.zip
wrap by default, at the window width, with a break marker
Diffstat (limited to 'test/snapshots/wrap.snap')
-rw-r--r--test/snapshots/wrap.snap59
1 files changed, 31 insertions, 28 deletions
diff --git a/test/snapshots/wrap.snap b/test/snapshots/wrap.snap
index c6e976b1..b8849474 100644
--- a/test/snapshots/wrap.snap
+++ b/test/snapshots/wrap.snap
@@ -1,35 +1,34 @@
-# Soft line breaks (the Wrap builtin, `SPC t w`): a file line too long for the
-# pane renders across several body rows instead of running off the right edge.
-# OFF by default, and off it is the clipping render it has always been.
+# Soft line breaks: ON by default, off with the Wrap builtin (`SPC t w`). A
+# file line too long for the pane renders across several body rows instead of
+# running off the right edge.
#
-# Three rules pinned here. The break is at min(100, the pane's own content
-# width), so a narrow pane breaks at its own edge and a wide one stops at 100.
-# A continuation row carries a BLANK gutter — the number belongs to the LINE,
-# and a number repeated down a wrapped line would read as several lines. And
-# the mouse follows the render: a click on a continuation row lands on the
-# character under the pointer, which only works if the click resolves through
-# the same row->line map the body was drawn from.
+# Three rules pinned here. The break is at the PANE'S OWN content width and
+# nothing else — there is no upper bound, a wide window breaks wide. A
+# continuation row carries a BLANK gutter (the number belongs to the LINE, and
+# a number repeated down a wrapped line would read as several lines) and the
+# row it broke out of ends in `↩`, in the one column the wrap keeps free for
+# it — a break is otherwise invisible, and an absent line number is a poor
+# thing to read a document by. And the mouse follows the render: a click on a
+# continuation row lands on the character under the pointer, which only works
+# if the click resolves through the same row->line map the body was drawn from.
#
# The line is 20 decades, each headed by its own column marker: `0` at column
# 0, `4` at 40, `A` at 100. So the first character of a continuation row NAMES
# the column it broke at, and the width rule is readable straight off the grid.
file long.txt 0---------1---------2---------3---------4---------5---------6---------7---------8---------9---------A---------B---------C---------D---------E---------F---------G---------H---------I---------J---------\nsecond line\nthird line\n
-# 47 columns: the 2-column chrome gutter plus the 5-column line-number gutter
-# leave 40 for content, under 100, so the PANE's width is the break.
-start 14 47 long.txt
+# 48 columns: the 2-column chrome gutter, the 5-column line-number gutter and
+# the 1 column the `↩` sits in leave 40 for content.
+start 14 48 long.txt
wait 8000 New Newcol
stable 700 20000
-# off: line 1 on ONE row, cut at the right edge, lines 2 and 3 under it
-snap off
-key space t w
-stable 400 5000
-# on: five rows for line 1 (200 bytes / 40), the four continuations gutterless
-# and starting at `4` `8` `C` `G` — the columns 40, 80, 120, 160
+# the default: five rows for line 1 (200 bytes / 40), the four continuations
+# gutterless and starting at `4` `8` `C` `G` — the columns 40, 80, 120, 160 —
+# and each of the first four rows ending in the break marker
snap on-narrow
# a click on the SECOND row of line 1, on the `5` marker at column 50. The
# cursor must come back to the cell that was clicked (grid 17,3): the click
# resolved to line 1 column 50, and the render put line 1 column 50 back where
-# the finger was. Off by one row and it would land in line 2 instead.
+# the finger was. Off by one row and it would land in line 2.
press left 18 4
release left 18 4
stable 400 5000
@@ -39,16 +38,20 @@ snap clicked
key j
stable 400 5000
snap logical-j
-# ...and off again is off: the same clipped body as the first snap, because
-# the map the readers consult goes back to empty and every one of them falls
-# back to the row arithmetic it used before any of this existed
+# SPC t w turns it off: line 1 back on ONE row, clipped at the right edge with
+# no marker, lines 2 and 3 under it — the render this pane had before soft
+# breaks existed, because the map the readers consult goes back to empty and
+# every one of them falls back to the row arithmetic it used before any of it
key space t w
stable 400 5000
-snap off-again
-# 127 columns: 120 for content, so the 100 wins and the break is at the `A`
-start 14 127 long.txt
-wait 8000 New Newcol
-stable 700 20000
+snap off
+# ...and on again is on
key space t w
stable 400 5000
+snap on-again
+# 128 columns: 120 for content, and the break is at the `C` — column 120, the
+# window's own width. The old 100-column cap would have broken at the `A`.
+start 14 128 long.txt
+wait 8000 New Newcol
+stable 700 20000
snap on-wide