I make sure carefully in the future.
https://gist.github.com/ntak/8372268
--------
Thanks.
Nobuhiro Takasaki
This problem was caused by a bug of Windows 8.
This behavior is not a specification.
I saw, os_win32.c we have acquired one by one event from the buffer of the key code in ReadConsoleInput.
Due to a bug in Windows 8, pointer to a buffer of key code does not increment.
However, the number of events is decremented.
To avoid this, it can only be processed by the read operation once all the events of the buffers in the key code.
The patch, I made that way.
In fact, os_win32.c is hacking manner how to use the API.
The previous patch works, too, but did not completely correspond to the hacking.
Hacks:
(Use the data obtained by PeekConsoleInput, incrementing the buffer ReadConsoleInput)
(ReadConsoleInput returns an error, the code to switch the STDIN)
The latest patch will solve all.
I studied about the manners of the various programmer then.
Vim is a great program.
--------
Thanks.
Nobuhiro Takasaki