aboutsummaryrefslogtreecommitdiffstats
path: root/docs/scripting.md
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-29 14:26:18 +0200
committeruser <user@clank>2026-09-29 14:26:18 +0200
commit43fa063445821470cbf55f85aa8116c11470396f (patch)
tree1612fa68b3aa70bf75a9ec28a76cbd8d05f9264d /docs/scripting.md
parentpanes: $SLOSH_PANE, so a program knows which pane it is in (diff)
downloadslosh-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