blob: af1363dddd37e726597dfcba93a835a7ce63eddf (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# `/` file search: the pattern types into the tag (persistent, no popup);
# Enter searches the buffer in-core and writes `path:LINE:COL-ENDCOL text` into
# a +Search OUTPUT BUFFER (a file pane with no file behind it — no Save in its
# tag); n/N select the next/prev row there and look it, so the file pane
# scrolls to the hit AND SELECTS IT — the row names the match's whole span, not
# just where it starts. Esc abandons the input; a no-match search opens an EMPTY buffer
# (every search gets its own, stacked under the pane) and leaves n with
# nowhere to go.
file g.txt l1\nMARK a\nl3\nl4\nl5\nMARK b\nl7\nl8\nl9\nMARK c\nl11\nl12
start 30 180 -n 3
wait 8000 g.txt
stable 700 20000
# open g.txt: type the name in the shell, look it (as in look-file.snap)
press left 5 8
release left 5 8
stable 400 5000
key i
text g.txt
key esc
settle 100
stable 400 5000
press right 6 8
release right 6 8
wait 10000 MARK a
stable 700 15000
snap opened
# / starts the search input in the tag; the pattern is visible while typing
key /
stable 400 5000
text MARK
stable 400 5000
snap typing
key enter
wait 10000 g.txt:2:1-4 MARK
stable 700 10000
snap results
# n selects result 1 in the results buffer, scrolls the file to line 2 and
# selects the four cells the pattern matched there — the styles below are what
# prove the second half of that
key n
stable 700 15000
snap first
snapstyle first
key n
stable 700 15000
snap second
key n
stable 700 15000
snap third
# N walks back up to result 2 (line 6)
key N
stable 700 15000
snap back
# Esc abandons the input: the tag tail is restored
key /
text zz
key esc
settle 100
stable 400 5000
snap cancel
# a no-match search: n has nowhere to go (nothing changes, no crash)
key /
text zzqq
key enter
stable 700 10000
key n
stable 400 5000
snap nomatch
|