Small writes would not normally display controls.
This commit is contained in:
Jason Hood 2017-12-24 18:23:32 +10:00
parent 62f7d0240e
commit e8247f3aa7

6
ANSI.c
View File

@ -631,16 +631,20 @@ void FlushBuffer( void )
if (nCharInBuffer < 4 && !im && !pState->tb_margins) if (nCharInBuffer < 4 && !im && !pState->tb_margins)
{ {
LPWSTR b = ChBuffer; LPWSTR b = ChBuffer;
if (pState->crm)
SetConsoleMode( hConOut, cache[0].mode & ~ENABLE_PROCESSED_OUTPUT );
do do
{ {
WriteConsole( hConOut, b, 1, &nWritten, NULL ); 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 ); GetConsoleScreenBufferInfo( hConOut, &Info );
if (CUR.X == 0) if (CUR.X == 0)
++nWrapped; ++nWrapped;
} }
} while (++b, --nCharInBuffer); } while (++b, --nCharInBuffer);
if (pState->crm)
SetConsoleMode( hConOut, cache[0].mode );
} }
else else
{ {