Closed TTimo closed 1 year ago
Thanks! This fixes the colored output not working in some contexts for me (e.g. CLion's "run" window).
The only issue I'm seeing is arrow keys stop working in Windows Terminal after I run light.exe
- instead of cycling through history like normal, they print escape sequences.
There's some mention of this issue here: https://stackoverflow.com/a/52608157
It seems to not happen if I comment out:
// HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE);
// SetConsoleMode(hInput, ENABLE_VIRTUAL_TERMINAL_INPUT);
, and the colored output still works, so maybe the hOutput
lines are enough?
Ah yes, just hOutput
may be enough. My setup is just a run window like CLion so I never got to test the input side.
…needing to enable system wide. Good for CreateProcess CREATE_NEW_CONSOLE situations.
cc @Paril