blob: 58f4c1eee805bef040df3c7d3511d1c71f5cbba1 (
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
|
# tty mode round-trip: Ctrl-b in, run a command, Ctrl-b out. Shift-Esc (CSI
# 27;2u — needs a host that reports modifiers on Escape) also gets you IN; a
# PLAIN Esc does not, it still goes to the shell.
#
# Getting OUT is Ctrl-b alone. Shift-Esc in tty is what Escape is in normal
# mode instead — Last, the pane you were in before this one — leaving this pane
# in tty so coming back lands in the program you left. The hop itself is
# covered by a unit test in pardes.zig.
file m.txt marker
start 30 100 -n 3
wait 8000 m.txt
stable 700 20000
key c-b
stable 600 8000
snap tty-on
text echo SNAP''OK
key enter
wait 8000 SNAPOK
stable 700 10000
snap tty-echo
key c-b
stable 600 8000
snap tty-off
# Shift-Esc: in, the same as Ctrl-b...
send \e[27;2u
stable 600 8000
snap shift-esc-on
# ...but not out. With no doc pane to hop to it changes nothing: still tty,
# prompts still shown, same pane focused.
send \e[27;2u
stable 600 8000
snap shift-esc-nodoc
# Ctrl-b still leaves tty in place, which is now the only thing that does.
key c-b
stable 600 8000
snap ctrl-b-off
|