diff options
Diffstat (limited to 'test/snapshots/windownav.snap')
| -rw-r--r-- | test/snapshots/windownav.snap | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/test/snapshots/windownav.snap b/test/snapshots/windownav.snap new file mode 100644 index 00000000..0e57fc1e --- /dev/null +++ b/test/snapshots/windownav.snap @@ -0,0 +1,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 |
