From e8247f3aa747dac065efb3fe410996b7ae6d333f Mon Sep 17 00:00:00 2001 From: Jason Hood Date: Sun, 24 Dec 2017 18:23:32 +1000 Subject: [PATCH] Fix CRM Small writes would not normally display controls. --- ANSI.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ANSI.c b/ANSI.c index 1b96e77..a780706 100644 --- a/ANSI.c +++ b/ANSI.c @@ -631,16 +631,20 @@ void FlushBuffer( void ) if (nCharInBuffer < 4 && !im && !pState->tb_margins) { LPWSTR b = ChBuffer; + if (pState->crm) + SetConsoleMode( hConOut, cache[0].mode & ~ENABLE_PROCESSED_OUTPUT ); do { WriteConsole( hConOut, b, 1, &nWritten, NULL ); - if (*b != '\r' && *b != '\b' && *b != '\a') + if (pState->crm || (*b != '\r' && *b != '\b' && *b != '\a')) { GetConsoleScreenBufferInfo( hConOut, &Info ); if (CUR.X == 0) ++nWrapped; } } while (++b, --nCharInBuffer); + if (pState->crm) + SetConsoleMode( hConOut, cache[0].mode ); } else {