builtin: fix truncating of EOL on windows terminal (#8338)
parent
0a61149476
commit
21ba0470af
|
@ -73,8 +73,8 @@ fn builtin_init() {
|
||||||
C.SetConsoleOutputCP(C.CP_UTF8)
|
C.SetConsoleOutputCP(C.CP_UTF8)
|
||||||
C.atexit(restore_codepage)
|
C.atexit(restore_codepage)
|
||||||
if is_atty(1) > 0 {
|
if is_atty(1) > 0 {
|
||||||
C.SetConsoleMode(C.GetStdHandle(C.STD_OUTPUT_HANDLE), C.ENABLE_PROCESSED_OUTPUT | 0x0004) // enable_virtual_terminal_processing
|
C.SetConsoleMode(C.GetStdHandle(C.STD_OUTPUT_HANDLE), C.ENABLE_PROCESSED_OUTPUT | C.ENABLE_WRAP_AT_EOL_OUTPUT | 0x0004) // enable_virtual_terminal_processing
|
||||||
C.SetConsoleMode(C.GetStdHandle(C.STD_ERROR_HANDLE), C.ENABLE_PROCESSED_OUTPUT | 0x0004) // enable_virtual_terminal_processing
|
C.SetConsoleMode(C.GetStdHandle(C.STD_ERROR_HANDLE), C.ENABLE_PROCESSED_OUTPUT | C.ENABLE_WRAP_AT_EOL_OUTPUT | 0x0004) // enable_virtual_terminal_processing
|
||||||
unsafe {
|
unsafe {
|
||||||
C.setbuf(C.stdout, 0)
|
C.setbuf(C.stdout, 0)
|
||||||
C.setbuf(C.stderr, 0)
|
C.setbuf(C.stderr, 0)
|
||||||
|
|
Loading…
Reference in New Issue