diff options
| author | sl0p <sl0p@sl0p.foo> | 2026-08-13 23:50:24 +0200 |
|---|---|---|
| committer | sl0p <sl0p@sl0p.foo> | 2026-08-13 23:50:24 +0200 |
| commit | b514f68d9535e0ee882eecbbac217486f999f538 (patch) | |
| tree | 1175f74690a61080a8b2d9339335f8b42ef52f05 /src/server.c | |
| parent | sl0ptty: focus follows the mouse, with the guards that make it liveable (diff) | |
| download | slosh-b514f68d9535e0ee882eecbbac217486f999f538.tar.gz slosh-b514f68d9535e0ee882eecbbac217486f999f538.tar.xz slosh-b514f68d9535e0ee882eecbbac217486f999f538.zip | |
sl0ptty: scrollback — wheel, keyboard, and a clickable indicator
libghostty-vt already keeps the scrollback, so the work was deciding whose
wheel it is:
- a program tracking the mouse gets the wheel events themselves;
- a full-screen program without mouse tracking (vim, less) has no scrollback
of ours to show, so the wheel becomes arrow keys, which is what it means
to that program;
- anything else scrolls our viewport.
All three are tested against real programs rather than asserted in principle.
C-a PageUp/PageDown/Home/End, and scroll_lines in the config for the wheel.
Typing snaps back to the live view, because reading scrollback and then typing
into a screen you are not looking at is a trap. New output does not yank the
viewport back — it just grows the gap, which the indicator shows.
The indicator is compact, right-aligned, budgeted after the split button and
before the title (a title is the thing you can most afford to lose), and
clicking it returns to the bottom.
Three test failures on the way, all mine and all instructive: the top of the
scrollback is the shell's first prompt rather than the first line of output;
typing without a newline types rather than runs; and two side-by-side panes
share a screen row, so asserting on line(y) reads both frames at once.
341 checks green.
Diffstat (limited to 'src/server.c')
0 files changed, 0 insertions, 0 deletions
