feat: add per input mode init_command and deinit_command support

closes #92
This commit is contained in:
CJ van den Berg 2025-04-07 21:07:36 +02:00
parent 563eb57e44
commit 6743c99c12
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 22 additions and 12 deletions

View file

@ -673,6 +673,8 @@ fn enter_input_mode(self: *Self, new_mode: Mode) command.Result {
self.input_mode_ = null;
}
self.input_mode_ = new_mode;
if (new_mode.init_command) |cmd|
cmd.execute_const();
}
fn refresh_input_mode(self: *Self) command.Result {