mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 06:15:54 +08:00
reader: Remove a panic
The special input functions self-insert, self-insert-not-first, and and or used to be handled by inputter_t::readch, but they aren't anymore with `commandline -f`. I am unsure if these *would* have worked, I can't come up with a use. So, for now, do nothing instead of panicking.
This commit is contained in:
parent
c7d878a8d2
commit
652996124d
|
@ -3172,7 +3172,8 @@ impl ReaderData {
|
|||
self.parser().libdata_mut().is_repaint = false;
|
||||
}
|
||||
rl::SelfInsert | rl::SelfInsertNotFirst | rl::FuncAnd | rl::FuncOr => {
|
||||
panic!("should have been handled by inputter_t::readch");
|
||||
// This can be reached via `commandline -f and` etc
|
||||
// panic!("should have been handled by inputter_t::readch");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -375,6 +375,10 @@ expect_prompt("foobar")
|
|||
# This should do nothing instead of crash
|
||||
sendline("commandline -f backward-jump")
|
||||
expect_prompt()
|
||||
sendline("commandline -f self-insert")
|
||||
expect_prompt()
|
||||
sendline("commandline -f and")
|
||||
expect_prompt()
|
||||
|
||||
# Check that the builtin version of `exit` works
|
||||
# (for obvious reasons this MUST BE LAST)
|
||||
|
|
Loading…
Reference in New Issue
Block a user