[FEATURE] Support for manual backend initialization/deinitialization
- Dominant language
- Rust
- Stars
- 4.8k
- Forks
- 270
- Avg merge
- 5d 19h
- Merged PRs (30d)
- 2
Description
This is more or less essential in utilities that invoke interactive commands. My proposal is to add two new methods to `Cursive`: `stop()` and `resume()`. `stop()` would de-initialize the backend (i.e. disable raw mode, show cursor leave alternate screen etc) and make the event loop noop (the same as if it were running with `backend::Dummy`) until `resume()` is called. `resume()` would initialize the backend and restore the event loop. This is useful in the case you need to invoke an interactive command (eg. `fdisk`) from a callback in a `View`. Currently, the only way to do this is to manually run the de-initialization part of `Backend::drop`, invoke the command and finally run the initialization code from `Backend::init()`.
Contributor guide
Assessment
This issue has not been assessed yet.