conf_override! wraps struct definitions and defines a secondary Override
struct that wraps each field in an Option. The macro mailbox_settings!
is used to select settings from an account & mailbox index. If a user defines an overriding setting, the macro returns the override instead of the immediately next in the hierarchy setting.
The selection is done for a specific field as follows:
if per-folder override is defined, return per-folder override
else if per-account override is defined, return per-account override
else return global setting field value.
So far only the connection is implemented, and using the
testing/manage_sieve binary you can get a shell to a managesieve server.
The managesieve interface will be used in the UI from a plugin, but the
plugin's interface isn't implemented yet.
When an embedded process exits the main process receives a SIGCHLD. The
check on whether the embedded process is alive is done on input, so
forward an input of '\0' to get the embedded terminal to notice its
child is dead.
Input thread listens on stdin input and forwards the input to the main
process. When an embedded terminal is launched within the main process,
the input thread is asked to switch to raw input, that is to send the
parsed input and the raw bytes to the main process in order to get them
forwarded to the embedded terminal. The switch happens by calling
get_events and get_events_raw.
When the input thread receives an InputCommand::{No,}Raw, it has already
received an input event, since the `select!` is within the
stdin events for loop. (There's no way to `select` on blocking iterators
or raw fds, which is unfortunate.).
This commit forwards the input to the next function instead of dropping
it.
restore_input is called in State::rcv_event on arrival of a fork
finished event:
```
UIEvent::Fork(ForkType::Finished) => {
self.switch_to_main_screen();
self.switch_to_alternate_screen();
self.context.restore_input();
return;
}
```
So there shouldn't be an extra call here.