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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# acme button-3 in a text file = search: right-click / right-select reuse the
# `/` machinery. A click expands the file-ish word (config.isFileChar) and, when
# it names no file, searches the buffer for it — hits into the +Search output
# buffer, n/N walk them like `/`. A right-select searches the span verbatim.
# A real path (sub/dep.txt:3) still resolves and OPENS — expansion keeps / . :
# so paths are not broken; only the non-file case falls through to search.
dirmk sub
file sub/dep.txt d1\nd2\nDEPTARGET\nd4\nd5\nd6
file code.txt run count_x now\nopen sub/dep.txt:3 here\ncount_x again\npick two words
start 31 210 -n 1
wait 8000 code.txt
stable 700 20000
# open code.txt: type the name in a shell, right-click it (ordinary look)
press left 5 9
release left 5 9
stable 400 5000
key i
text code.txt
key esc
settle 100
stable 400 5000
press right 6 9
release right 6 9
wait 10000 count_x
stable 700 15000
snap opened
# right-CLICK the identifier `count_x` (line 1, the 'n' at col 15). It names no
# file, so the click searches for it: the results list both lines containing it.
press right 15 4
release right 15 4
wait 10000 code.txt:1:5-11 run count_x
stable 700 15000
snap search
# right-SELECT `pick two` (line 4, sweep cols 8..15): a multi-word span passes
# through verbatim (the space is kept), unlike a click's single-word expansion.
press right 8 7
drag right 15 7
release right 15 7
wait 10000 code.txt:4:1-8 pick two
stable 700 15000
snap select
# right-CLICK the path `sub/dep.txt:3` (line 2, col 18): isFileChar keeps / . :
# so the click expands the whole token and it RESOLVES — a look, not a search —
# opening dep.txt scrolled to line 3 (DEPTARGET). The "don't break paths" case.
press right 18 5
release right 18 5
wait 10000 DEPTARGET
stable 700 15000
snap path-open
# A click does not merely LIST the hits, it goes to one: this re-search of
# `count_x` (line 1, col 15) also STEPS onto hit 1, so the cursor lands in the
# match — line 1 col 5, not the column that was clicked.
press right 15 4
release right 15 4
stable 700 15000
snap step1
# ...and the same word clicked in its OTHER place (line 3, col 10) opens NO
# second +Search: the list is already armed on this pattern, so the click is
# `n`. Cursor moves to hit 2, line 3.
press right 10 6
release right 10 6
stable 700 15000
snap step2
# past the last hit the ring wraps: back to hit 1, line 1.
press right 10 6
release right 10 6
stable 700 15000
snap step3
# A LEFT sweep over `pick two` (line 4, cols 8..15) and then a right CLICK
# INSIDE it: the click takes the whole selection — the search is for the
# two-word span (`4:1-8`), which the file-ish word expansion could never
# produce from the single word under the click.
press left 8 7
drag left 15 7
release left 15 7
stable 400 5000
press right 11 7
release right 11 7
stable 700 15000
snap selclick
# ...and a right click OUTSIDE the selection is the ordinary word click again:
# `words` (line 4, col 19), not the span left lying in the pane.
press right 19 7
release right 19 7
stable 700 15000
snap outside
|