blob: 1ac8d081874ba23ac9f5361812b8deefb51e4da6 (
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
|
# external file updates: a write from outside pardes lands in the open pane,
# and Undo brings the unsaved edit back. That is the whole contract — the
# update is committed like any other edit, so nothing has to be merged.
lines w.txt 12
start 30 150 -n 3
wait 8000 w.txt
stable 700 20000
# open w.txt as a file pane: type the name into the shell, right-click it
press left 5 8
release left 5 8
stable 400 5000
key i
text w.txt
key esc
settle 100
press right 6 8
release right 6 8
wait 10000 line 3
stable 700 15000
# an UNSAVED edit on line 1
press left 10 3
release left 10 3
stable 400 5000
key i
text MYEDIT
key esc
settle 100
stable 400 5000
snap edited
# overwrite the file from a shell in another column. The marker is split so
# the ECHOED command line never matches the wait — only the reloaded pane does
press left 60 5
release left 60 5
stable 400 5000
key c-b
stable 600 8000
text echo EXTERN''AL > w.txt
key enter
wait 10000 EXTERNAL
stable 700 10000
snap reloaded
# back in the file pane: one undo and the unsaved edit is there again
press left 10 3
release left 10 3
stable 400 5000
key u
stable 400 5000
snap undone
|