mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-29 22:41:16 -03:00
Handle exit in keybindings immediately
This simply checks if the parser requested exit after running any binding scripts (in read_normal_chars). I think this means we no longer need the `exit` bind function. Fixes #7967.
This commit is contained in:
@@ -3932,6 +3932,11 @@ maybe_t<wcstring> reader_data_t::readline(int nchars_or_0) {
|
||||
}
|
||||
}
|
||||
|
||||
// If we ran `exit` anywhere, exit.
|
||||
exit_loop_requested |= parser().libdata().exit_current_script;
|
||||
parser().libdata().exit_current_script = false;
|
||||
if (exit_loop_requested) continue;
|
||||
|
||||
if (!event_needing_handling || event_needing_handling->is_check_exit()) {
|
||||
continue;
|
||||
} else if (event_needing_handling->is_eof()) {
|
||||
|
||||
Reference in New Issue
Block a user