summaryrefslogtreecommitdiff
path: root/test/snapshots/scrolloff.snap
blob: 3dbad2b85024591fb2bc0b5cef189e190c3bf82f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# scrolloff: keyboard motion keeps 3 context rows above/below the cursor,
# clamped at file boundaries (cursor may reach the top/bottom body row there)
lines g.txt 40
start 16 210 -n 1
wait 8000 g.txt
stable 700 20000
# right-click the g.txt name in the greeting ls -> file pane under the shell's
# text, 9 body rows
press right 4 5
release right 4 5
wait 10000 line 3
stable 700 15000
press left 10 9
release left 10 9
stable 400 5000
# (b) gg: cursor CAN sit on the top body row, no forced scroll
key g g
stable 400 5000
snap top
# (a) five j's reach the bottom margin (visual row 5 of 9) without scrolling...
key j j j j j
stable 400 5000
snap edge
# ...the sixth j scrolls: view slides one line, cursor holds the margin
key j
stable 400 5000
snap scrolled1
key j j j j
stable 400 5000
snap jdown
# (d) ge (goto last line; bare G is a helix no-op): bottom clamp, view stops
# at EOF-at-bottom, cursor on the bottom row
key g e
stable 400 5000
snap end
# (c) k-walk up: cursor climbs to the top margin, then the view scrolls
key k k k k k k k k
stable 400 5000
snap kup
# (b) again from deep in the file: gg puts the cursor back on the top row
key g g
stable 400 5000
snap top2