To: vim_dev@googlegroups.com Subject: Patch 7.4.1972 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1972 Problem: On Solaris select() does not work as expected when there is typeahead. Solution: Add ICANON when sleeping. (Ozaki Kiichi) Files: src/os_unix.c *** ../vim-7.4.1971/src/os_unix.c 2016-06-10 19:49:10.370889582 +0200 --- src/os_unix.c 2016-07-01 14:57:18.738276933 +0200 *************** *** 3411,3417 **** tnew.c_cc[VTIME] = 0; /* don't wait */ } else if (tmode == TMODE_SLEEP) ! tnew.c_lflag &= ~(ECHO); # if defined(HAVE_TERMIOS_H) { --- 3411,3423 ---- tnew.c_cc[VTIME] = 0; /* don't wait */ } else if (tmode == TMODE_SLEEP) ! { ! /* 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) { *** ../vim-7.4.1971/src/version.c 2016-07-01 14:48:02.654783860 +0200 --- src/version.c 2016-07-01 14:55:29.843933708 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1972, /**/ -- Very funny, Scotty. Now beam down my clothes. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///