Console-Docs
Console-Docs copied to clipboard
Can we please have clearer documentation on what the failure behavior of SetConsoleMode?
Can we please have clearer documentation in MSDN on what the failure behaviour of these functions is? For instance:
- It's not documented whether we need to set the buffer back to the original mode on failure.
- It's not documented what error codes we can expect to get from
GetLastError
and whether it's even possible to handle them (it could be any of 16000 errors!).- It's not documented whether buffers and their modes persist when the program exits.
I understand the need to keep suboptimal behaviour because old versions of powershell were incorrect, but I need to know about it in advance so that I can make my programs correct.
Originally posted by @Gyross in https://github.com/microsoft/terminal/issues/13738#issuecomment-1216006957
Also:
- Which output modes are inherited when a new screen buffer is created. E.g.; I've seen
ENABLE_VIRTUAL_TERMINAL_PROCESSING
inherited, while other modes likeENABLE_WRAP_AT_EOL_OUTPUT
are reset.
Thanks.