Closed rnpnr closed 11 months ago
The commit I just pushed is a little better. vis:pipe()
will now throw
an error if you try to call it without specifying a file before a window
is open.
You can test it by adding something like the following to visrc.lua
:
vis.events.subscribe(vis.events.FILE_OPEN, function()
err, out = vis:pipe("echo no explosion")
if (out) then
vis:message(out)
end
end)
fixes #1107
Note: This is a bit of a hack and I don't think it should actually be applied. It only works when file is changed via the
else
branch of the check that follows.I will work on a proper fix later if no one has anything better.