smelt.buf¶
Tier: UiHost — Requires a terminal UI; calling these from headless mode raises.
Buffer handle constructor. smelt.buf.new(opts?) returns a Buf userdata. opts.name opts the buffer into hot-reload survival — repeat calls with the same name return the same handle with mutable opts re-applied. Anonymous buffers are reaped on /reload. UiHost-only — buffers are terminal-screen backing stores that windows render into.
smelt.buf.new¶
Types: smelt.buf.Buf
Create a buffer and return a Buf userdata. opts.name opts the buffer into hot-reload survival — repeat calls with the same name return the same handle with mutable opts re-applied. When omitted from a module body, a stable per-(plugin, declaration-index) name is auto-assigned so the buffer survives /reload without explicit naming.