diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-27 11:45:56 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:07 -0300 |
| commit | d91c2cc53f816634a5471672bd33b842f06e849e (patch) | |
| tree | 1193b6752db6a62d85d7ef6c06c38d95ae495d43 /test | |
| parent | 6877a61ef40ad0d8e762a28d0a3f5fa9bfefaff2 (diff) | |
| download | pardes-d91c2cc53f816634a5471672bd33b842f06e849e.tar.gz pardes-d91c2cc53f816634a5471672bd33b842f06e849e.zip | |
tag columns are the WHOLE rendered tag: h/j/k/l walk taglines, the path selects but never edits
Diffstat (limited to 'test')
| -rw-r--r-- | test/snapshots/images.snap | 9 | ||||
| -rw-r--r-- | test/snapshots/tagnav.golden | 372 | ||||
| -rw-r--r-- | test/snapshots/tagnav.snap | 75 | ||||
| -rw-r--r-- | test/snapshots/tagpath.golden | 310 | ||||
| -rw-r--r-- | test/snapshots/tagpath.snap | 69 |
5 files changed, 832 insertions, 3 deletions
diff --git a/test/snapshots/images.snap b/test/snapshots/images.snap index 9c510bed..e31d57ec 100644 --- a/test/snapshots/images.snap +++ b/test/snapshots/images.snap @@ -36,9 +36,12 @@ key a stable 700 15000 snap no-ascii # the tag takes an edit like any other pane's now — nothing live left in it to -# protect, so the image early-return in enterTagEdit is gone -press left 20 2 -release left 20 2 +# protect, so the image early-return in enterTagEdit is gone. Col 42 is the +# FIRST EDITABLE column (right after "img <path>"): a tag column is a column of +# the whole rendered tag, and the live prefix is read-only, so a click at col 20 +# would land in the path and the typing below would be inert. +press left 42 2 +release left 42 2 stable 400 5000 text Zork stable 400 5000 diff --git a/test/snapshots/tagnav.golden b/test/snapshots/tagnav.golden new file mode 100644 index 00000000..2b00eba5 --- /dev/null +++ b/test/snapshots/tagnav.golden @@ -0,0 +1,372 @@ +== snap start grid=100x30 cursor=7,2 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha +| 2 beta w.txt +| 3 gamma +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap colon grid=100x30 cursor=39,1 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha +| 2 beta w.txt +| 3 gamma +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap right-tag grid=100x30 cursor=83,1 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha +| 2 beta w.txt +| 3 gamma +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap left-tag grid=100x30 cursor=39,1 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha +| 2 beta w.txt +| 3 gamma +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap down-tag grid=100x30 cursor=33,16 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha +| 2 beta w.txt +| 3 gamma +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap up-tag grid=100x30 cursor=39,1 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha +| 2 beta w.txt +| 3 gamma +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap up-edge grid=100x30 cursor=39,1 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha +| 2 beta w.txt +| 3 gamma +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap arrows-still-motion grid=100x30 cursor=41,1 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha +| 2 beta w.txt +| 3 gamma +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap back-to-body grid=100x30 cursor=7,2 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha +| 2 beta w.txt +| 3 gamma +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap tty-on grid=100x30 cursor=54,4 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del TTY /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha $ ls +| 2 beta w.txt +| 3 gamma $ +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap tty-tag grid=100x30 cursor=83,1 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha +| 2 beta w.txt +| 3 gamma +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap tty-restored grid=100x30 cursor=54,4 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del TTY /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha $ ls +| 2 beta w.txt +| 3 gamma $ +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| diff --git a/test/snapshots/tagnav.snap b/test/snapshots/tagnav.snap new file mode 100644 index 00000000..6ba86c08 --- /dev/null +++ b/test/snapshots/tagnav.snap @@ -0,0 +1,75 @@ +# h/j/k/l ON A TAGLINE move focus BETWEEN taglines. A tag is a place in the +# LAYOUT, not just a line of text, so the four letters walk the layout and land +# on the neighbour's TAG (top row of the window), still in normal mode — you +# walk the taglines and never drop through a body. They run the SAME +# Left/Down/Up/Right builtins `SPC w h/j/k/l` and `Ctrl-w h/j/k/l` run: one +# focusDir, three routes to it. The ARROWS keep the in-tag grapheme motion, so +# no capability was traded away. +# +# Evidence is the `cursor=` header (the ACTIVE pane's cursor, which while a tag +# is focused sits on THAT pane's tag row) plus the tag text itself: a focused +# tag renders its owner's mode, so NOR means the tag is in normal mode and the +# pane we left is back in its body mode. +file w.txt alpha\nbeta\ngamma +start 30 100 w.txt +wait 8000 Kill Newcol +wait 8000 w.txt +stable 700 20000 +# Alt-n: a shell below the file, so the left column has two rows and every +# direction has somewhere to go +key a-n +stable 700 15000 +key space w k +stable 400 5000 +snap start +# `:` -> the file's OWN tagline, normal mode, parked at the tail's start +key : +stable 400 5000 +snap colon +# l -> right, onto the launch shell's TAGLINE (not its body) +key l +stable 400 5000 +snap right-tag +# h -> back left onto the file's tagline +key h +stable 400 5000 +snap left-tag +# j -> down onto the tagline of the shell under the file +key j +stable 400 5000 +snap down-tag +# k -> back up onto the file's +key k +stable 400 5000 +snap up-tag +# k again: nothing above the file. focusDir leaves `active` alone, so the move +# is a plain no-op and the tag KEEPS focus — you stay exactly where you were. +key k +stable 400 5000 +snap up-edge +# the arrows are still in-tag motion: two rights walk two columns of the tail +key right right +stable 400 5000 +snap arrows-still-motion +key esc +settle 700 +stable 400 5000 +snap back-to-body +# A TERMINAL MUST NOT LOSE ITS TTY MODE. Put the launch shell in raw tty mode +# (Ctrl-b), come back, then hop onto its tagline and off again: exitTagEdit +# restores the body mode the tag hijacked, so its prefix reads TTY again. +key c-w l +stable 400 5000 +key c-b +stable 700 15000 +snap tty-on +key c-w h +stable 400 5000 +key : +key l +stable 400 5000 +snap tty-tag +key esc +settle 700 +stable 400 5000 +snap tty-restored diff --git a/test/snapshots/tagpath.golden b/test/snapshots/tagpath.golden new file mode 100644 index 00000000..0b073a8c --- /dev/null +++ b/test/snapshots/tagpath.golden @@ -0,0 +1,310 @@ +== snap start grid=100x30 cursor=7,2 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagpath/cwd/c.txt Save Del NOR /tmp/pardes-snap/tagpath/cwd Del +| 1 line 1 +| 2 line 2 c.txt +| 3 line 3 +| 4 line 4 +| 5 +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap colon grid=100x30 cursor=40,1 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagpath/cwd/c.txt Save Del NOR /tmp/pardes-snap/tagpath/cwd Del +| 1 line 1 +| 2 line 2 c.txt +| 3 line 3 +| 4 line 4 +| 5 +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap col0 grid=100x30 cursor=2,1 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagpath/cwd/c.txt Save Del NOR /tmp/pardes-snap/tagpath/cwd Del +| 1 line 1 +| 2 line 2 c.txt +| 3 line 3 +| 4 line 4 +| 5 +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap sel-nor grid=100x30 cursor=5,1 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagpath/cwd/c.txt Save Del NOR /tmp/pardes-snap/tagpath/cwd Del +| 1 line 1 +| 2 line 2 c.txt +| 3 line 3 +| 4 line 4 +| 5 +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap sel-path grid=100x30 cursor=39,1 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagpath/cwd/c.txt Save Del NOR /tmp/pardes-snap/tagpath/cwd Del +| 1 line 1 +| 2 line 2 c.txt +| 3 line 3 +| 4 line 4 +| 5 +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== style sel-path +|0: 0-37 #949494,#121212, 38-99 d,#121212, +|1: 0-1 d,#626262, 2-4 #949494,#121212, 5-39 #d8c8a8,#4a3a1e, 40-48 #949494,#121212, 49-49 d,#121212, 50-51 d,#262626, 52-87 #949494,#121212, 88-99 d,#121212, +|2: 0-1 d,#444444, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|3: 0-1 d,#444444, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|4: 0-1 d,#444444, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|5: 0-1 d,#444444, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|6: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|7: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|8: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|9: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|10: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|11: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|12: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|13: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|14: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|15: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|16: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|17: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|18: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|19: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|20: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|21: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|22: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|23: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|24: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|25: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|26: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|27: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|28: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|29: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +== snap yanked-path grid=100x30 cursor=42,2 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagpath/cwd/c.txt Save Del NOR /tmp/pardes-snap/tagpath/cwd Del +| 1 l /tmp/pardes-snap/tagpath/cwd/c.txtine 1 +| 2 line 2 c.txt +| 3 line 3 +| 4 line 4 +| 5 +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap drag-cross grid=100x30 cursor=45,1 +|Kill Newcol Tutor Debug NextColor Dump +| INS /tmp/pardes-snap/tagpath/cwd/c.txt Save Del NOR /tmp/pardes-snap/tagpath/cwd Del +| 1 l /tmp/pardes-snap/tagpath/cwd/c.txtine 1 +| 2 line 2 c.txt +| 3 line 3 +| 4 line 4 +| 5 +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== style drag-cross +|0: 0-37 #949494,#121212, 38-99 d,#121212, +|1: 0-1 d,#626262, 2-10 #949494,#121212, 11-45 #d8c8a8,#4a3a1e, 46-48 #949494,#121212, 49-49 d,#121212, 50-51 d,#262626, 52-87 #949494,#121212, 88-99 d,#121212, +|2: 0-1 d,#444444, 2-6 #626262,#080808, 7-47 #bdbdbd,#080808, 48-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|3: 0-1 d,#444444, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|4: 0-1 d,#444444, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|5: 0-1 d,#444444, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|6: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|7: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|8: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|9: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|10: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|11: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|12: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|13: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|14: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|15: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|16: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|17: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|18: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|19: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|20: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|21: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|22: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|23: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|24: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|25: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|26: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|27: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|28: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +|29: 0-1 d,#444444, 2-6 #626262,#080808, 7-49 d,#080808, 50-51 d,#444444, 52-99 #bdbdbd,#080808, +== snap path-inert grid=100x30 cursor=11,1 +|Kill Newcol Tutor Debug NextColor Dump +| INS /tmp/pardes-snap/tagpath/cwd/c.txt Save Del NOR /tmp/pardes-snap/tagpath/cwd Del +| 1 l /tmp/pardes-snap/tagpath/cwd/c.txtine 1 +| 2 line 2 c.txt +| 3 line 3 +| 4 line 4 +| 5 +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| diff --git a/test/snapshots/tagpath.snap b/test/snapshots/tagpath.snap new file mode 100644 index 00000000..61181dd5 --- /dev/null +++ b/test/snapshots/tagpath.snap @@ -0,0 +1,69 @@ +# THE PATH IN A TAG IS SELECTABLE, NOT EDITABLE. +# tag_col/tag_anchor index the WHOLE rendered tag (prefix ++ tail) — one +# coordinate space, no conversions: the renderer prints the cursor at tag_col +# verbatim and a mouse column IS a tag column. So motions and sweeps reach the +# mode indicator and the path, a selection over them yanks and executes like +# any other text, and the ONLY thing fenced off is EDITING: every edit op +# measures from the first editable column (tagPrefix().len) and does nothing to +# the left of it. +lines c.txt 4 +start 30 100 c.txt +wait 8000 Kill Newcol +wait 8000 c.txt +stable 700 20000 +snap start +# --- keyboard: select part of the PATH --- +# `:` parks at the tail's start (the first EDITABLE column) — unchanged, that +# is what makes `:w<Tab>` the same two keystrokes every time +key : +stable 400 5000 +snap colon +# 0 goes to column 0 of the RENDERED tag: the "N" of NOR, a column the keyboard +# could not name at all before +key 0 +stable 400 5000 +snap col0 +# W: the long word it traverses, landing the cursor on the space after "NOR" +key W +stable 400 5000 +snap sel-nor +# E: extend to the end of the next long word — the style capture shows ONE +# highlighted run from that space through the last char of the path +key E +stable 400 5000 +snap sel-path +snapstyle sel-path +# y yanks the selection. Esc hands the body back; p pastes the register into +# the file, which is the only way a snapshot can see what was yanked. +key y +key esc +settle 700 +stable 400 5000 +key p +stable 400 5000 +snap yanked-path +# --- mouse: a sweep across the prefix/tail boundary --- +# a left press on a tagline anchors a TAG sweep (not the body's block +# selection), so the drag paints one run of the tag row. Press at col 12 +# (inside the path), release at col 46 (just past "Save" in the tail): the +# highlight crosses the boundary — screen col 40, where the tail starts — in +# one piece, which is the whole point of there being one coordinate space. +press left 12 2 +drag left 30 2 +drag left 46 2 +release left 46 2 +stable 400 5000 +snap drag-cross +snapstyle drag-cross +# --- the path is inert to editing --- +# a plain click INSIDE the path leaves the cursor there (no clamp into the +# tail), in insert mode like any tag click — and then typing and backspace do +# NOTHING: the tag row below is byte-identical to the one in `yanked-path`. +press left 12 2 +release left 12 2 +stable 400 5000 +text ZZNOPE +key bs +key bs +stable 400 5000 +snap path-inert |
