summaryrefslogtreecommitdiff
path: root/test/snapshots/windownav.snap
blob: 0e57fc1ea4354ea2f12ba4eec01e9ee1176bd24f (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
44
45
46
47
48
49
50
51
52
53
54
# RULE: moving focus is a BUILTIN like any other, so there is ONE
# implementation and every route reaches it. SPC w h/j/k/l run Left/Down/Up/
# Right — the geometric focusDir the Ctrl-w prefix also runs — and SPC w t
# runs Toggleterm, the hop between the most recently focused DOCUMENT (a file,
# an image, a +Search/+Help output buffer: things you READ) and the most
# recently focused TERMINAL. "Most recent" is the focus history the core
# already keeps to hand focus back when a pane closes, so the hop back is the
# same key. Focus shows up in the golden's `cursor=` header: that is the
# ACTIVE pane's cursor, so each snap is named by the pane it should land in.
file w.txt alpha\nbeta\ngamma
start 30 100 w.txt
wait 8000 Kill Newcol
wait 8000 w.txt
stable 700 20000
# left column = the file, right column = the launch shell; the file has focus
snap start
# SPC w t with a shell that has NEVER been focused: nothing to find in the
# history, so it falls back to a scan and still lands in the right column
key space w t
stable 400 5000
snap to-term
# ...and back, because the file is now the latest document
key space w t
stable 400 5000
snap back-to-file
# Alt-n: a second shell, below the file — the left column now has two rows
key a-n
stable 700 15000
snap altn
# SPC w k: up out of that new shell into the file above it
key space w k
stable 400 5000
snap up
# SPC w l: right, into the launch shell
key space w l
stable 400 5000
snap right
# SPC w h: left, back into the file column
key space w h
stable 400 5000
snap left
# SPC w j: down, into the shell under the file
key space w j
stable 400 5000
snap down
# SPC w t from a terminal: the file, which is the only document here
key space w t
stable 400 5000
snap toggle-doc
# ...and back to the LATEST terminal — the one just left, not the launch shell
# in the right column, which was focused earlier
key space w t
stable 400 5000
snap toggle-back