After processing a signal/event while waiting for commandline input, check the lookahead buffer for inserted characters
darcs-hash:20061118211531-ac50b-355fd5556f65e9cec3af5ed9e19a44af9bfe3b7b.gz
This commit is contained in:
parent
1b71f91a01
commit
5d864e3f69
2
input.c
2
input.c
@ -1675,6 +1675,8 @@ wint_t input_readch()
|
||||
{
|
||||
|
||||
int i;
|
||||
|
||||
CHECK_BLOCK();
|
||||
|
||||
/*
|
||||
Clear the interrupted flag
|
||||
|
@ -98,6 +98,11 @@ static wint_t readb()
|
||||
{
|
||||
return res;
|
||||
}
|
||||
if( lookahead_count )
|
||||
{
|
||||
return lookahead_arr[--lookahead_count];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -107,7 +112,7 @@ static wint_t readb()
|
||||
default:
|
||||
{
|
||||
/*
|
||||
The teminal has been closed. Save and exit.
|
||||
The terminal has been closed. Save and exit.
|
||||
*/
|
||||
return R_EOF;
|
||||
}
|
||||
@ -122,6 +127,11 @@ static wint_t readb()
|
||||
debug( 3, L"Wake up on universal variable event" );
|
||||
env_universal_read_all();
|
||||
do_loop = 1;
|
||||
|
||||
if( lookahead_count )
|
||||
{
|
||||
return lookahead_arr[--lookahead_count];
|
||||
}
|
||||
}
|
||||
}
|
||||
if( FD_ISSET( 0, &fd ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user