summaryrefslogtreecommitdiff
path: root/test/snapshots/look-center.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-06 14:49:20 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:07 -0300
commit430914371acd3fe46c31d7be900214e7ea03f657 (patch)
tree83c8eae33356b068fa580c172180a308d5bc1bb5 /test/snapshots/look-center.snap
parentde4def3548a6729b0dfd2120495a61beef8c8c2c (diff)
downloadpardes-430914371acd3fe46c31d7be900214e7ea03f657.tar.gz
pardes-430914371acd3fe46c31d7be900214e7ea03f657.zip
look on path:NN centers the target line in the pane body (scroll = line - body/2, clamped at 0): fresh opens lay out first (computeGeom after placeDoc) to center with the real body height; dedup re-looks recenter the existing pane. look-file golden shifts accordingly; new look-center snap proves fresh-open centering, dedup recentering, and the top clamp.
Diffstat (limited to 'test/snapshots/look-center.snap')
-rw-r--r--test/snapshots/look-center.snap28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/snapshots/look-center.snap b/test/snapshots/look-center.snap
new file mode 100644
index 00000000..db575844
--- /dev/null
+++ b/test/snapshots/look-center.snap
@@ -0,0 +1,28 @@
+# a look on path:NN opens the file with the target line CENTERED in the body
+# (scroll = line - body/2): fresh open at a deep line, then dedup re-looks at
+# the same path re-center the existing pane, and a look near line 1 clamps
+# the scroll at 0 (no negative scroll)
+lines big.txt 200
+start 30 100
+wait 8000 big.txt
+stable 700 20000
+press left 5 8
+release left 5 8
+stable 400 5000
+key i
+text big.txt:100 big.txt:150 big.txt:2
+key esc
+settle 700
+stable 400 5000
+press right 7 8
+release right 7 8
+stable 700 15000
+snap center-open
+press right 18 18
+release right 18 18
+stable 700 15000
+snap center-dedup
+press right 30 18
+release right 30 18
+stable 700 15000
+snap center-clamp