mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
input.cpp: remove impossible switch case
R_BEGIN_INPUT_FUNCTIONS <= c < R_END_INPUT_FUNCTIONS, so c cannot be R_EOF.
This commit is contained in:
parent
4cf3e62643
commit
40de04cc6c
1 changed files with 1 additions and 5 deletions
|
@ -489,15 +489,11 @@ wint_t input_readch(bool allow_commands) {
|
|||
// Clear the interrupted flag.
|
||||
reader_reset_interrupted();
|
||||
// Search for sequence in mapping tables.
|
||||
while (1) {
|
||||
while (true) {
|
||||
wchar_t c = input_common_readch(0);
|
||||
|
||||
if (c >= R_BEGIN_INPUT_FUNCTIONS && c < R_END_INPUT_FUNCTIONS) {
|
||||
switch (c) {
|
||||
case R_EOF: // if it's closed, then just return
|
||||
{
|
||||
return R_EOF;
|
||||
}
|
||||
case R_SELF_INSERT: {
|
||||
// Issue #1595: ensure we only insert characters, not readline functions. The
|
||||
// common case is that this will be empty.
|
||||
|
|
Loading…
Reference in a new issue