To: vim_dev@googlegroups.com Subject: Patch 7.4.1888 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1888 Problem: Wrong computation of remaining wait time in RealWaitForChar() Solution: Remember the original waiting time. Files: src/os_unix.c *** ../vim-7.4.1887/src/os_unix.c 2016-06-04 14:11:15.578299483 +0200 --- src/os_unix.c 2016-06-04 14:28:12.530285494 +0200 *************** *** 5577,5601 **** /* Remember at what time we started, so that we know how much longer we * should wait after being interrupted. */ # define USE_START_TV struct timeval start_tv; ! if (msec > 0 && ( ! # ifdef FEAT_XCLIPBOARD ! xterm_Shell != (Widget)0 ! # if defined(USE_XSMP) || defined(FEAT_MZSCHEME) ! || ! # endif ! # endif ! # ifdef USE_XSMP ! xsmp_icefd != -1 ! # ifdef FEAT_MZSCHEME ! || ! # endif ! # endif ! # ifdef FEAT_MZSCHEME ! (mzthreads_allowed() && p_mzq > 0) ! # endif ! )) gettimeofday(&start_tv, NULL); # endif --- 5577,5586 ---- /* Remember at what time we started, so that we know how much longer we * should wait after being interrupted. */ # define USE_START_TV + long start_msec = msec; struct timeval start_tv; ! if (msec > 0) gettimeofday(&start_tv, NULL); # endif *************** *** 5911,5917 **** { # ifdef USE_START_TV /* Compute remaining wait time. */ ! msec -= elapsed(&start_tv); # else /* Guess we got interrupted halfway. */ msec = msec / 2; --- 5896,5902 ---- { # ifdef USE_START_TV /* Compute remaining wait time. */ ! msec = start_msec - elapsed(&start_tv); # else /* Guess we got interrupted halfway. */ msec = msec / 2; *** ../vim-7.4.1887/src/version.c 2016-06-04 14:11:15.582299483 +0200 --- src/version.c 2016-06-04 14:28:57.046284882 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1888, /**/ -- George: "I just got a new set of golf clubs for my wife!" John: "Great trade!" /// 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 ///