mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-13 04:41:15 -03:00
Be more disciplined about cancellation signals
Rather than storing a "should cancel" flag in the parser, store the actual signal which triggered cancellation.
This commit is contained in:
@@ -189,7 +189,7 @@ maybe_t<eval_result_t> parse_execution_context_t::check_end_execution() const {
|
||||
if (shell_is_exiting()) {
|
||||
return eval_result_t::cancelled;
|
||||
}
|
||||
if (parser && parser->cancellation_requested) {
|
||||
if (parser && parser->cancellation_signal) {
|
||||
return eval_result_t::cancelled;
|
||||
}
|
||||
const auto &ld = parser->libdata();
|
||||
@@ -643,7 +643,7 @@ eval_result_t parse_execution_context_t::report_error(const parse_node_t &node,
|
||||
}
|
||||
|
||||
eval_result_t parse_execution_context_t::report_errors(const parse_error_list_t &error_list) const {
|
||||
if (!parser->cancellation_requested) {
|
||||
if (!parser->cancellation_signal) {
|
||||
if (error_list.empty()) {
|
||||
FLOG(error, L"Error reported but no error text found.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user