diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-06 21:08:40 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:07 -0300 |
| commit | f442004dcd8e91114765a918201ecabe99f69eeb (patch) | |
| tree | 141d8991a753e82cb3d897c8a717230c2c82913e /test/snapshots | |
| parent | 49f8c696ea208d2653521699d77d7e8f48cac183 (diff) | |
| download | pardes-f442004dcd8e91114765a918201ecabe99f69eeb.tar.gz pardes-f442004dcd8e91114765a918201ecabe99f69eeb.zip | |
horizontal scroll for file panes (terminals wrap at pty width — nothing to scroll): pane.hscroll cuts content columns after the lineno gutter in bodyText (post edit-splice, so typed runs shift with the text), no scrollbar. Drivers: horizontal wheel (new wheel_left/right Mouse.Buttons, SGR 66/67 via vaxis on the tty, SDL wheel.x on the gui, ±4 cols, clamped at 0, right overscroll allowed) and keyboard movement — ensureCursorVisible grew the horizontal mirror of the scrolloff reconcile, so $ pulls the view right with 3 columns of margin and 0 reels it home; the wheel never moves the cursor. Shifted alongside: syntax recolor pass, modal cursor paint (hidden when off-view), vsel highlight, click->content-col mapping, cursorWordSel. Byte columns like the rest of the file-pane code. New hscroll.snap golden: wheel shift with fixed gutter, left clamp, $ margin follow, 0 home. 30/30.
Diffstat (limited to 'test/snapshots')
| -rw-r--r-- | test/snapshots/hscroll.golden | 155 | ||||
| -rw-r--r-- | test/snapshots/hscroll.snap | 43 |
2 files changed, 198 insertions, 0 deletions
diff --git a/test/snapshots/hscroll.golden b/test/snapshots/hscroll.golden new file mode 100644 index 00000000..3eed48f8 --- /dev/null +++ b/test/snapshots/hscroll.golden @@ -0,0 +1,155 @@ +== snap opened grid=60x30 cursor=7,2 +|Kill Newcol Tutor Debug Colors NextColor Dump +| NOR /tmp/pardes-snap/hscroll NOR /tmp/pardes-snap/hscroll +| 1 short1 END_A_MARKER_WAY +| wide.txt +| +| +| +|╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ +| NOR /tmp/pardes-snap/hscroll +| +| wide.txt +| +| +| +| wide.txt +| +| NOR /tmp/pardes-snap/hscroll +| +| wide.txt +| +| +| +| +| +| +| +| +| +| +| +== snap wheeled grid=60x30 cursor=7,2 +|Kill Newcol Tutor Debug Colors NextColor Dump +| NOR /tmp/pardes-snap/hscroll NOR /tmp/pardes-snap/hscroll +| 1 ND_A_MARKER_WAY_OUT_RIG +| wide.txt +| +| +| +| +| NOR /tmp/pardes-snap/hscroll +| +| wide.txt +| +| +| +| wide.txt +| +| NOR /tmp/pardes-snap/hscroll +| +| wide.txt +| +| +| +| +| +| +| +| +| +| +| +== snap clamped grid=60x30 cursor=7,2 +|Kill Newcol Tutor Debug Colors NextColor Dump +| NOR /tmp/pardes-snap/hscroll NOR /tmp/pardes-snap/hscroll +| 1 short1 END_A_MARKER_WAY +| wide.txt +| +| +| +| +| NOR /tmp/pardes-snap/hscroll +| +| wide.txt +| +| +| +| wide.txt +| +| NOR /tmp/pardes-snap/hscroll +| +| wide.txt +| +| +| +| +| +| +| +| +| +| +| +== snap dollar grid=60x30 cursor=26,2 +|Kill Newcol Tutor Debug Colors NextColor Dump +| NOR /tmp/pardes-snap/hscroll NOR /tmp/pardes-snap/hscroll +| 1 padpadpadpadpad_TAIL +| wide.txt +| +| +| +| +| NOR /tmp/pardes-snap/hscroll +| +| wide.txt +| +| +| +| wide.txt +| +| NOR /tmp/pardes-snap/hscroll +| +| wide.txt +| +| +| +| +| +| +| +| +| +| +| +== snap zero grid=60x30 cursor=7,2 +|Kill Newcol Tutor Debug Colors NextColor Dump +| NOR /tmp/pardes-snap/hscroll NOR /tmp/pardes-snap/hscroll +| 1 short1 END_A_MARKER_WAY +| wide.txt +| +| +| +| +| NOR /tmp/pardes-snap/hscroll +| +| wide.txt +| +| +| +| wide.txt +| +| NOR /tmp/pardes-snap/hscroll +| +| wide.txt +| +| +| +| +| +| +| +| +| +| +| diff --git a/test/snapshots/hscroll.snap b/test/snapshots/hscroll.snap new file mode 100644 index 00000000..37a1b647 --- /dev/null +++ b/test/snapshots/hscroll.snap @@ -0,0 +1,43 @@ +# horizontal scroll, file panes only (terminals wrap at pty width): the +# horizontal wheel shifts the content window (gutter stays put, no scrollbar), +# and keyboard movement keeps the scrolloff margin sideways — $ on a long +# line pulls the view right, 0 snaps it back. Overscroll right is allowed; +# a cursor move reels it in. +file wide.txt short1 END_A_MARKER_WAY_OUT_RIGHT_padpadpadpadpadpadpadpadpadpadpadpadpadpad_TAIL +start 30 60 -n 3 +wait 8000 wide.txt +stable 700 20000 +# open wide.txt: click a body spot, type the name, look it +press left 5 8 +release left 5 8 +stable 400 5000 +key i +text wide.txt +key esc +settle 700 +stable 400 5000 +press right 7 8 +release right 7 8 +stable 700 15000 +snap opened +# wheel right over the file pane: content shifts, line numbers stay +send \x1b[<66;10;3M +send \x1b[<66;10;3M +stable 400 5000 +snap wheeled +# wheel back left past the start clamps at column 0 +send \x1b[<67;10;3M +send \x1b[<67;10;3M +send \x1b[<67;10;3M +stable 400 5000 +snap clamped +# $ walks the cursor to the line end: the view follows with the margin +key g g +stable 400 5000 +key $ +stable 400 5000 +snap dollar +# 0 back to column zero: the view snaps home +key 0 +stable 400 5000 +snap zero |
