input: Resolve a TODO

This commit is contained in:
Fabian Boehm 2024-02-16 19:17:26 +01:00
parent 035948eb2f
commit 1160bf84ed

View file

@ -922,10 +922,10 @@ impl Inputter {
return res; return res;
} }
ReadlineCmd::FuncAnd | ReadlineCmd::FuncOr => { ReadlineCmd::FuncAnd | ReadlineCmd::FuncOr => {
// If previous function has bad status, we want to skip all functions that // If previous function has bad status, skip all functions that follow us.
// follow us. if (!self.function_status && cmd == ReadlineCmd::FuncAnd)
// TODO: this line is too tricky. || (self.function_status && cmd == ReadlineCmd::FuncOr)
if (cmd == ReadlineCmd::FuncAnd) != self.function_status { {
self.drop_leading_readline_events(); self.drop_leading_readline_events();
} }
} }