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

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 Commit f599a473 Parent ffed4984 Change ID mpkvyuyk