Something went wrong. Try again.
Go bindings for libghostty-vt. pkg.go.dev/go.mitchellh.com/libghostty
ghostty
Something went wrong. Try again.
terminal: pass *Terminal as first parameter to effect callbacks master
Previously, effect callback function types (WritePtyFn, BellFn, TitleChangedFn, etc.) did not receive the terminal that triggered them. This forced callers using the functional option pattern to pre-declare a var and use a split assignment so closures could capture it, as seen in the effects example. All effect callback types now take *Terminal as their first parameter. The C trampolines already recovered the *Terminal from userdata, so they now simply forward it to the Go handler. This lets callers define callbacks inline in NewTerminal without any pre-declaration workaround.
Author Mitchell Hashimoto Date (Apr 18, 2026, 2:30 PM UTC) Commit f599a473 f599a473465c0ce8ec9a31b44fd64ecba8fce182 Parent ffed4984 ffed49841adf6a98cb6d0f004cbfe6fb5b85cdec Change ID mpkvyuyk mpkvyuyknouxnkpsmstqwkpssotquynk