Go bindings for libghostty-vt. pkg.go.dev/go.mitchellh.com/libghostty

docs: describe render hold behavior on reset, resize, and snapshots #31

Open robmorgan.id.au
targeting main
Open opened by and assigned to robmorgan.id.au
targeting main

RenderHoldFunc said it runs while the terminal processes VT input, but libghostty also invokes it from Terminal.Reset and Terminal.Resize when they end an active hold, on the caller's goroutine before the method returns. A renderer that takes its own lock around Resize and again inside the callback deadlocks. Say so on RenderHoldFunc, on Reset and Resize, and in the package effects overview, which previously stated that effects only run during VT writes.

The callback also only reports transitions. A terminal decoded from a snapshot taken during synchronized output is already in a hold, so a callback attached afterwards never sees held=true for it and its first call is held=false. I'm documenting that on RenderHoldFunc and Decode and pointing at Terminal.Mode(ModeSyncOutput) for the initial state,

I've also added a test that pins the behavior.

This pull request has no versions submitted yet.