Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: runtime/bin/stdio_win.cc

Issue 2760503003: [dart:io][windows] Stdout.supportsAnsiEscapes is false when not connected to a terminal (Closed)
Patch Set: More fixes Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/stdio_win.cc
diff --git a/runtime/bin/stdio_win.cc b/runtime/bin/stdio_win.cc
index 40df3a707beb4370409dba5e6298a84a76f8b04f..7e7690247f41c2656dbba99123acbfd48b324c91 100644
--- a/runtime/bin/stdio_win.cc
+++ b/runtime/bin/stdio_win.cc
@@ -92,12 +92,12 @@ bool Stdin::AnsiSupported(bool* supported) {
HANDLE h = GetStdHandle(STD_INPUT_HANDLE);
if (h == INVALID_HANDLE_VALUE) {
*supported = false;
- return false;
+ return true;
}
DWORD mode;
if (!GetConsoleMode(h, &mode)) {
*supported = false;
- return false;
+ return true;
}
*supported = (mode & ENABLE_VIRTUAL_TERMINAL_INPUT) != 0;
return true;
@@ -131,12 +131,12 @@ bool Stdout::AnsiSupported(intptr_t fd, bool* supported) {
}
if (h == INVALID_HANDLE_VALUE) {
*supported = false;
- return false;
+ return true;
}
DWORD mode;
if (!GetConsoleMode(h, &mode)) {
*supported = false;
- return false;
+ return true;
}
*supported = (mode & ENABLE_VIRTUAL_TERMINAL_PROCESSING) != 0;
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698