mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 7.4.1888
Problem: Wrong computation of remaining wait time in RealWaitForChar() Solution: Remember the original waiting time.
This commit is contained in:
@@ -5577,25 +5577,10 @@ RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED, int *interrupted)
|
|||||||
/* Remember at what time we started, so that we know how much longer we
|
/* Remember at what time we started, so that we know how much longer we
|
||||||
* should wait after being interrupted. */
|
* should wait after being interrupted. */
|
||||||
# define USE_START_TV
|
# define USE_START_TV
|
||||||
|
long start_msec = msec;
|
||||||
struct timeval start_tv;
|
struct timeval start_tv;
|
||||||
|
|
||||||
if (msec > 0 && (
|
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);
|
gettimeofday(&start_tv, NULL);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@@ -5911,7 +5896,7 @@ select_eintr:
|
|||||||
{
|
{
|
||||||
# ifdef USE_START_TV
|
# ifdef USE_START_TV
|
||||||
/* Compute remaining wait time. */
|
/* Compute remaining wait time. */
|
||||||
msec -= elapsed(&start_tv);
|
msec = start_msec - elapsed(&start_tv);
|
||||||
# else
|
# else
|
||||||
/* Guess we got interrupted halfway. */
|
/* Guess we got interrupted halfway. */
|
||||||
msec = msec / 2;
|
msec = msec / 2;
|
||||||
|
@@ -753,6 +753,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1888,
|
||||||
/**/
|
/**/
|
||||||
1887,
|
1887,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user