1
0
forked from aniani/vim

patch 7.4.1972

Problem:    On Solaris select() does not work as expected when there is
            typeahead.
Solution:   Add ICANON when sleeping. (Ozaki Kiichi)
This commit is contained in:
Bram Moolenaar 2016-07-01 15:03:46 +02:00
parent e8fea0728a
commit 40de45664c
2 changed files with 9 additions and 1 deletions

View File

@ -3411,7 +3411,13 @@ mch_settmode(int tmode)
tnew.c_cc[VTIME] = 0; /* don't wait */
}
else if (tmode == TMODE_SLEEP)
tnew.c_lflag &= ~(ECHO);
{
/* Also reset ICANON here, otherwise on Solaris select() won't see
* typeahead characters. */
tnew.c_lflag &= ~(ICANON | ECHO);
tnew.c_cc[VMIN] = 1; /* return after 1 char */
tnew.c_cc[VTIME] = 0; /* don't wait */
}
# if defined(HAVE_TERMIOS_H)
{

View File

@ -753,6 +753,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1972,
/**/
1971,
/**/