diff --git a/src/input.cpp b/src/input.cpp index a228a9e44..4687ef283 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -249,7 +249,7 @@ void input_mapping_add(const wchar_t *sequence, const wchar_t *command, const wc /// Handle interruptions to key reading by reaping finshed jobs and propagating the interrupt to the /// reader. -static maybe_t interrupt_handler() { +static maybe_t interrupt_handler() { // Fire any pending events. event_fire_delayed(); // Reap stray processes, including printing exit status messages. @@ -260,10 +260,10 @@ static maybe_t interrupt_handler() { if (vintr == 0) { return none(); } - return vintr; + return char_event_t{vintr}; } - return R_NULL; + return char_event_t{R_NULL}; } static std::atomic input_initialized{false}; diff --git a/src/input_common.h b/src/input_common.h index 81c857d5d..2dc302383 100644 --- a/src/input_common.h +++ b/src/input_common.h @@ -124,7 +124,7 @@ class char_event_t { /// A type of function invoked on interrupt. /// \return the event which is to be returned to the reader loop, or none if VINTR is 0. -using interrupt_func_t = maybe_t (*)(); +using interrupt_func_t = maybe_t (*)(); /// Init the library with an interrupt function. void input_common_init(interrupt_func_t func);