# `Laev.Quiet`
[🔗](https://github.com/alexdont/laev/blob/main/lib/laev/quiet.ex#L1)

Nothing else writes to the terminal while a picker owns it.

fzf draws a whole frame and tracks the selected row itself. A line printed
underneath it from somewhere else scrolls the screen without fzf knowing, so
what you see ends up one row off what fzf thinks is selected: the arrow keys
move to the wrong place and enter picks the row above. On a slow link — over
SSH from a phone or a Mac terminal — the offset frame can sit there for a
while, which is when it gets noticed.

Background work is what does it. A sync push and a MyAnimeList scrobble both
land about five seconds after a film ends, with the post-play menu already
open, and each used to print a line about it.

So while a picker is up, notes from anywhere else are dropped rather than
printed. They are status chatter — a sync that didn't go through is still
visible in `laev sync status` and goes again on the next launch — and a
corrupted menu costs more than the line is worth.

Only the process running the picker holds it, and the flag is global to the
run, because the writers are separate processes.

# `held?`

True while a picker owns the screen.

# `hold`

Run `fun` with the terminal reserved. Always releases it.

# `puts`

Write a background note to stderr — unless a picker owns the screen.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
