thanks for taking care of this evolution just a cursory look (far from being a review): * style: please don't use C++ comments, nor case switch ranges (they are not portable enough) * style: try to stick to the current style of modified file * size_t shall be printed with %Iu * escape sequences should only be interpreted when console output mode has the vt seq bit set * some non regression tests could be useful (no precise idea on what they should cover) * reusing SET_CONSOLE_OUTPUT_INFO_ATTR is a tempting idea; did you check that how is done on native? (it's a matter of knowning if the "current" color from an ANSI seq is also the default screen buffer color; or when two programs are attached to the same conhost, they share the "current" ANSI color) * MR should be tested for both wineconsole and unix console -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9973#note_128016