@@ -1576,34 +1576,35 @@ WaitForChar(long msec, int ignore_input)
15761576 dwWaitTime = p_mzq ; /* don't wait longer than 'mzquantum' */
15771577#endif
15781578#ifdef FEAT_TIMERS
1579+ // When waiting very briefly don't trigger timers.
1580+ if (dwWaitTime > 10 )
15791581 {
15801582 long due_time ;
15811583
1582- /* When waiting very briefly don't trigger timers. */
1583- if (dwWaitTime > 10 )
1584+ // Trigger timers and then get the time in msec until the next
1585+ // one is due. Wait up to that time.
1586+ due_time = check_due_timer ();
1587+ if (typebuf .tb_change_cnt != tb_change_cnt )
15841588 {
1585- /* Trigger timers and then get the time in msec until the
1586- * next one is due. Wait up to that time. */
1587- due_time = check_due_timer ();
1588- if (typebuf .tb_change_cnt != tb_change_cnt )
1589- {
1590- /* timer may have used feedkeys() */
1591- return FALSE;
1592- }
1593- if (due_time > 0 && dwWaitTime > (DWORD )due_time )
1594- dwWaitTime = due_time ;
1589+ // timer may have used feedkeys().
1590+ return FALSE;
15951591 }
1592+ if (due_time > 0 && dwWaitTime > (DWORD )due_time )
1593+ dwWaitTime = due_time ;
15961594 }
15971595#endif
1596+ if (
15981597#ifdef FEAT_CLIENTSERVER
1599- /* Wait for either an event on the console input or a message in
1600- * the client-server window. */
1601- if ( msg_wait_for_multiple_objects (1 , & g_hConIn , FALSE,
1602- dwWaitTime , QS_SENDMESSAGE ) != WAIT_OBJECT_0 )
1598+ // Wait for either an event on the console input or a
1599+ // message in the client-server window.
1600+ msg_wait_for_multiple_objects (1 , & g_hConIn , FALSE,
1601+ dwWaitTime , QS_SENDMESSAGE ) != WAIT_OBJECT_0
16031602#else
1604- if (wait_for_single_object (g_hConIn , dwWaitTime ) != WAIT_OBJECT_0 )
1603+ wait_for_single_object (g_hConIn , dwWaitTime )
1604+ != WAIT_OBJECT_0
16051605#endif
1606- continue ;
1606+ )
1607+ continue ;
16071608 }
16081609
16091610 cRecords = 0 ;
0 commit comments