File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -253,6 +253,9 @@ read_console_input(
253253 static DWORD s_dwIndex = 0 ;
254254 static DWORD s_dwMax = 0 ;
255255 DWORD dwEvents ;
256+ int head ;
257+ int tail ;
258+ int i ;
256259
257260 if (!win8_or_later )
258261 {
@@ -274,7 +277,29 @@ read_console_input(
274277 * lpEvents = 0 ;
275278 return TRUE;
276279 }
280+
281+ if (s_dwMax > 1 )
282+ {
283+ head = 0 ;
284+ tail = s_dwMax - 1 ;
285+ while (head != tail )
286+ {
287+ if (s_irCache [head ].EventType == WINDOW_BUFFER_SIZE_EVENT
288+ && s_irCache [head + 1 ].EventType
289+ == WINDOW_BUFFER_SIZE_EVENT )
290+ {
291+ /* Remove duplicate event to avoid flicker. */
292+ for (i = head ; i < tail ; ++ i )
293+ s_irCache [i ] = s_irCache [i + 1 ];
294+ -- tail ;
295+ continue ;
296+ }
297+ head ++ ;
298+ }
299+ s_dwMax = tail + 1 ;
300+ }
277301 }
302+
278303 * lpBuffer = s_irCache [s_dwIndex ];
279304 if (nLength != -1 && ++ s_dwIndex >= s_dwMax )
280305 s_dwMax = 0 ;
Original file line number Diff line number Diff line change @@ -738,6 +738,8 @@ static char *(features[]) =
738738
739739static int included_patches [] =
740740{ /* Add new patch number below this line */
741+ /**/
742+ 164 ,
741743/**/
742744 163 ,
743745/**/
You can’t perform that action at this time.
0 commit comments