summaryrefslogtreecommitdiff
path: root/test/snapshots/lookpanes.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 02:27:22 -0300
committerGabriel Schneider <[email protected]>2026-11-05 09:54:56 -0300
commit18e25095a8fe76943a120bcf30225e5a01ab1858 (patch)
tree05fb37cf9fc42fe99b9ecb04dfe1ce0332c969fb /test/snapshots/lookpanes.snap
parentd4485660aa6339dbe546a81f4b543d68dfbfa9ec (diff)
downloadpardes-18e25095a8fe76943a120bcf30225e5a01ab1858.tar.gz
pardes-18e25095a8fe76943a120bcf30225e5a01ab1858.zip
snapshots: cmdword, lookpanes and ttylook come back for a directory looked at opening the pane that lists it: cmdword's `@`Look .`` opens the cwd/ pane listing zzmark.txt, whose tag then runs the bare Exec as nothing and the command word as a command pane (a shell's tag typed it into the shell); lookpanes' alpha is its directory pane, through which zqonly.txt and then pick.txt resolve in access order as through the shell in alpha before; ttylook's Return on sub opens the empty sub/ pane, which n leaves for the pane it was looked out of, and its last capture, which looks the `ls` under the cursor into a +Search, is named cursorword for what it pins (it was fileopen, after a big.txt it never opened)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/snapshots/lookpanes.snap')
-rw-r--r--test/snapshots/lookpanes.snap95
1 files changed, 95 insertions, 0 deletions
diff --git a/test/snapshots/lookpanes.snap b/test/snapshots/lookpanes.snap
new file mode 100644
index 00000000..4bbc37d6
--- /dev/null
+++ b/test/snapshots/lookpanes.snap
@@ -0,0 +1,95 @@
+# a look resolves against EVERY open pane's directory, in access order: the
+# pane the click came from first, then the rest most-recently-focused first,
+# and only a word NO directory holds falls through to a search. Two dirs
+# (alpha, beta) hold same-named files and the shell's own cwd holds none of
+# them, so every look below would have been a search before. alpha's pane
+# is its directory window (a look at a directory opens a pane listing it),
+# whose directory is alpha.
+dirmk alpha
+dirmk beta
+file zzboot.txt x
+file alpha/amark.txt a
+file alpha/zqonly.txt ONLY-IN-ALPHA
+file alpha/pick.txt PICK-FROM-ALPHA
+file alpha/twin.txt TWIN-FROM-ALPHA
+file alpha/both.txt BOTH-FROM-ALPHA
+file beta/pick.txt PICK-FROM-BETA
+file beta/twin.txt TWIN-FROM-BETA
+file beta/both.txt BOTH-FROM-BETA
+# the file argument opens a pane whose directory is beta's, and nothing else —
+# so the workdir shell every look below falls through is opened with Alt-n
+# (`New`/`Newcol` open an empty +New scratch now, and one inheriting beta's
+# directory at that) and Alt-c puts it in a column of its own on the right;
+# its first line is a word to look FROM that pane
+file beta/bmark.txt both.txt\nb-marker
+# Builtins announce themselves by default, and an announcement is a band at
+# the top of the body -- which moves every row this script clicks. What the
+# verbs do is what is under test, not the announcement.
+config Verbose off
+start 51 130 beta/bmark.txt
+wait 8000 b-marker
+stable 700 20000
+key a-n
+key a-c
+wait 8000 zzboot.txt
+stable 700 20000
+key space w h
+stable 400 5000
+# an ordinary dir look on the shell's own ls output: alpha's directory pane,
+# split below it, which takes the keyboard
+press right @alpha 6
+release right @alpha 6
+wait 10000 amark.txt
+stable 700 20000
+# type the words to look into what is left of the workdir shell (past its own
+# ls output, on the same row: its last row is the resize handle)
+press left 95 5
+release left 95 5
+stable 400 5000
+key i
+text zqonly.txt pick.txt twin.txt
+key esc
+settle 100
+stable 400 5000
+snap shells
+# make the beta pane the most recently focused, so the walk has to pass it
+press left 10 5
+release left 10 5
+stable 700 10000
+# zqonly.txt is only under alpha: the clicked shell's cwd fails, beta fails,
+# alpha's directory pane answers. Before, this word became a search.
+press right @zqonly.txt 5
+release right @zqonly.txt 5
+wait 10000 ONLY-IN-ALPHA
+stable 700 20000
+snap other-dir
+# both.txt is in BOTH dirs and alpha is now the most recent (its file pane
+# just opened), but the CLICK still wins: looked inside the beta pane it
+# opens beta's copy
+press right 10 5
+release right 10 5
+wait 10000 BOTH-FROM-BETA
+stable 700 20000
+snap clicked-wins
+# from a pane whose own dir holds neither copy the access order decides:
+# focus alpha's directory pane (a click on its first row), look pick.txt (in
+# both dirs) from the workdir shell -> alpha's
+press left @amark.txt 9
+release left @amark.txt 9
+stable 700 10000
+press right @pick.txt 5
+release right @pick.txt 5
+wait 10000 PICK-FROM-ALPHA
+stable 700 20000
+snap mru-alpha
+# focus the beta pane instead and the same look flips: twin.txt is in both
+# dirs, beta is most recent, beta's copy opens
+press left 10 5
+release left 10 5
+stable 700 10000
+press right @twin.txt 5
+release right @twin.txt 5
+wait 10000 TWIN-FROM-BETA
+stable 700 20000
+snap mru-beta
+snapstyle mru-beta