summaryrefslogtreecommitdiff
path: root/test/snapshots/ttypaste.snap
blob: 1591c8c4da76e5feec26e37deee44b342f67b6ab (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
# Pasting INTO the program a tty pane is running.
#
# `SPC p` and the acme 1-3 chord are both unreachable in raw tty: the pty owns
# every keystroke and every button. So tty mode has its own chord, and a paste
# arriving from outside has to reach the shell rather than an edit buffer that
# the pty does not know exists.
#
# Two paths, both ending at the shell's command line:
#   Ctrl-V           types the DEFAULT register (config.tty_paste)
#   bracketed paste  the outer terminal's own paste, or a desktop one relayed
#                    by a GUI host, which used to land in an overlay instead
file src.txt PASTED-PAYLOAD
start 31 100 -n 3
wait 8000 src.txt
stable 700 20000
# fill the default register from a file pane: sweep the word and yank it
key c-b
stable 600 8000
# in tty now; type a prefix so the pasted text is visibly appended to it
text echo
stable 600 8000
# the outer terminal's bracketed paste: not a keystroke, no request behind it,
# and it must arrive at the shell's line
send \e[200~ BRACKETED\e[201~
stable 600 8000
snap bracketed-paste-reached-the-shell
# Ctrl-V types the register. Nothing was yanked in this session, so the
# register is empty and the chord is INERT rather than sending the shell the
# 0x16 it used to (quoted-insert): the line below is unchanged.
key c-v
stable 600 8000
snap ctrl-v-with-empty-register-is-inert