Thank you. Regarding IsDirectoryOperation, this is not an external API but rather an internal function. Windows definitely cycles through directories only, and not files, if the command being entered on the line is a directory operation like CD or MD, etc. For all other cases, and even for the command itself and at an empty command prompt, etc., the code will cycle through files and directories.
I missed that...
Regarding calling ReadConsole/CONSOLE_READCONSOLE_CONTROL, updating the buffer and then calling ReadConsoleInput, it seems we then still need the line editor code. It seems that the only benefit to that method would be mainly in the case where the user never uses the tab key. Otherwise I think that most of my code here would still remain.
the line edit part should still be handled by ReadInput
yes, some of the code you wrote will be needed: redraw (like you do for cleaning end of line... multiline support), cursor (re)positionning
but you should not need any code dealing with INPUT_RECORD