int nolmaplen;
#endif
int old_wcol, old_wrow;
+ int wait_tb_len;
/*
* This function doesn't work very well when called recursively. This may
/*
* get a character: 3. from the user - get it
*/
+ wait_tb_len = typebuf.tb_len;
c = inchar(typebuf.tb_buf + typebuf.tb_off + typebuf.tb_len,
typebuf.tb_buflen - typebuf.tb_off - typebuf.tb_len - 1,
!advance
{
if (!advance)
break;
- if (typebuf.tb_len > 0) /* timed out */
+ if (wait_tb_len > 0) /* timed out */
{
timedout = TRUE;
continue;
else
#endif
if (p[0] == NUL || (p[0] == K_SPECIAL && !script
+#ifdef FEAT_AUTOCMD
+ /* timeout may generate K_CURSORHOLD */
+ && (i < 2 || p[1] != KS_EXTRA || p[2] != (int)KE_CURSORHOLD)
+#endif
#if defined(WIN3264) && !defined(FEAT_GUI)
/* Win32 console passes modifiers */
&& (i < 2 || p[1] != KS_MODIFIER)