Repository navigation
v2.0.0 Terminal Callbacks
Floating Terminal Window Callbacks
This is a major update that streamlines the approach to handling closing windows and triggering behavior after the window has closed.
This functionality is most clearly presented when opening the changelog with the intention of triggering an update prompt afterwards. Previously this behavior was achieved by a hacky use of an ispreupdate option. This was hard-coded for that particular scenario and was prone to bugginess.
The ispreupdate option is now deprecated and will be removed at some point in the future.
The callback function option allows us to provide a function to be executed when the window closes. That function is also passed some data about the window including the process exit code.
In a future update I intend to also pass the buffer contents (terminal stdout) to the callback as well.
This will allow more advanced features like a changelog UI that isn't just a basic terminal output buffer.