diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-01 15:03:46 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-01 15:03:46 +0200 |
commit | 40de45664c20e7ca46a28a3f472202f90e47f8bf (patch) | |
tree | 9b78f1aa13931339629db87c6d2cf74a6d9d8250 /src | |
parent | e8fea0728a2fa1fe78ef0ac90dee1a84bd7ef9fb (diff) |
patch 7.4.1972v7.4.1972
Problem: On Solaris select() does not work as expected when there is
typeahead.
Solution: Add ICANON when sleeping. (Ozaki Kiichi)
Diffstat (limited to 'src')
-rw-r--r-- | src/os_unix.c | 8 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index f08adc58b1..32c1640f99 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -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) { diff --git a/src/version.c b/src/version.c index cfce606279..2c6d8c4a65 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1972, +/**/ 1971, /**/ 1970, |