comparison src/os_unix.c @ 9381:c665cc3292e0 v7.4.1972

commit https://github.com/vim/vim/commit/40de45664c20e7ca46a28a3f472202f90e47f8bf Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jul 1 15:03:46 2016 +0200 patch 7.4.1972 Problem: On Solaris select() does not work as expected when there is typeahead. Solution: Add ICANON when sleeping. (Ozaki Kiichi)
author Christian Brabandt <cb@256bit.org>
date Fri, 01 Jul 2016 15:15:05 +0200
parents c9f2b70feac0
children b2aada04d84e
comparison
equal deleted inserted replaced
9380:a419e980f5b7 9381:c665cc3292e0
3409 # endif 3409 # endif
3410 tnew.c_cc[VMIN] = 1; /* return after 1 char */ 3410 tnew.c_cc[VMIN] = 1; /* return after 1 char */
3411 tnew.c_cc[VTIME] = 0; /* don't wait */ 3411 tnew.c_cc[VTIME] = 0; /* don't wait */
3412 } 3412 }
3413 else if (tmode == TMODE_SLEEP) 3413 else if (tmode == TMODE_SLEEP)
3414 tnew.c_lflag &= ~(ECHO); 3414 {
3415 /* Also reset ICANON here, otherwise on Solaris select() won't see
3416 * typeahead characters. */
3417 tnew.c_lflag &= ~(ICANON | ECHO);
3418 tnew.c_cc[VMIN] = 1; /* return after 1 char */
3419 tnew.c_cc[VTIME] = 0; /* don't wait */
3420 }
3415 3421
3416 # if defined(HAVE_TERMIOS_H) 3422 # if defined(HAVE_TERMIOS_H)
3417 { 3423 {
3418 int n = 10; 3424 int n = 10;
3419 3425