martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.19k stars 259 forks source link

Lua API: vis:pipe() causes a segfault when called before a window is open #1107

Closed rnpnr closed 11 months ago

rnpnr commented 12 months ago

Since commit 424b219 vis will segfault if vis:pipe() is called when no windows are open. This can happen if you have some function calling vis:pipe() based on an event such as FILE_OPEN which doesn't actually depend on a window being present. For example my vis-gpg plugin does this when decrypting a file.

A temporary patch will follow in a pull request.