mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-26 11:01:16 -03:00
Send fish_cancel event on control-C again
This adds support for sending fish_cancel, and a test for it. Fixes #7384.
This commit is contained in:
@@ -2773,6 +2773,10 @@ void reader_data_t::handle_readline_command(readline_cmd_t c, readline_loop_stat
|
||||
|
||||
set_command_line_and_position(&command_line, L"", 0);
|
||||
s_reset_abandoning_line(&screen, termsize_last().width - command_line.size());
|
||||
|
||||
// Post fish_cancel, allowing it to fire.
|
||||
signal_clear_cancel();
|
||||
event_fire_generic(parser(), L"fish_cancel");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user