diff options
| author | user <user@clank> | 2026-09-29 14:26:18 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-09-29 14:26:18 +0200 |
| commit | 43fa063445821470cbf55f85aa8116c11470396f (patch) | |
| tree | 1612fa68b3aa70bf75a9ec28a76cbd8d05f9264d /docs/scripting.md | |
| parent | panes: $SLOSH_PANE, so a program knows which pane it is in (diff) | |
| download | slosh-43fa063445821470cbf55f85aa8116c11470396f.tar.gz slosh-43fa063445821470cbf55f85aa8116c11470396f.tar.xz slosh-43fa063445821470cbf55f85aa8116c11470396f.zip | |
panes: read and write a pane by id, without taking focus
`raw` wrote into the focused pane and `snapshot` composited the active tab,
so driving a pane anywhere else meant focusing it or selecting its tab
first. Both of those move the view of whoever is watching, and both lose to
anybody doing the same thing at the same time.
`raw` now takes an `id` (0 is the focused pane, as before), and `capture`
answers one pane's viewport as text -- from the pane's own terminal, so it
works for a pane in a background tab, changes no focus, and leaves the
human's selection alone. It builds its selection as a snapshot rather than
setting one on the terminal, because a read with a visible side effect is
not a read.
`capture` tells "no such pane" apart from "that pane is empty": a caller
polling a dead id would otherwise wait forever on a pane that is quiet
because it is gone.
Diffstat (limited to 'docs/scripting.md')
0 files changed, 0 insertions, 0 deletions
