changeset 9209:f8f41f4e0acd v7.4.1888

commit https://github.com/vim/vim/commit/76b6dfe54ba9b85cd9d8e6539205c1679a187961 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 4 14:37:22 2016 +0200 patch 7.4.1888 Problem: Wrong computation of remaining wait time in RealWaitForChar() Solution: Remember the original waiting time.
author Christian Brabandt <cb@256bit.org>
date Sat, 04 Jun 2016 14:45:06 +0200
parents 429f389cadb2
children 462af900d3b6
files src/os_unix.c src/version.c
diffstat 2 files changed, 5 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -5577,25 +5577,10 @@ RealWaitForChar(int fd, long msec, int *
     /* 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 && (
-#  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
-	    ))
+    if (msec > 0)
 	gettimeofday(&start_tv, NULL);
 # endif
 
@@ -5911,7 +5896,7 @@ select_eintr:
 	{
 # ifdef USE_START_TV
 	    /* Compute remaining wait time. */
-	    msec -= elapsed(&start_tv);
+	    msec = start_msec - elapsed(&start_tv);
 # else
 	    /* Guess we got interrupted halfway. */
 	    msec = msec / 2;
--- 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 */
 /**/
+    1888,
+/**/
     1887,
 /**/
     1886,