aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-12-02 09:20:33 +0100
committerMartin Ridgers <[email protected]>2021-12-02 11:36:19 +0100
commitd2b3dd29040b5403e54fbd34a7f3e227f5f52212 (patch)
tree1c88a4f3b1ec5eb60e2da8cc40e1311a69a6995e
parentMissing return statement (diff)
downloadzen-d2b3dd29040b5403e54fbd34a7f3e227f5f52212.tar.xz
zen-d2b3dd29040b5403e54fbd34a7f3e227f5f52212.zip
Only Windows-based terminals need VT100/ANSI support enabling
-rw-r--r--zen/zen.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/zen/zen.cpp b/zen/zen.cpp
index bbb9522c3..5b8777e01 100644
--- a/zen/zen.cpp
+++ b/zen/zen.cpp
@@ -63,6 +63,7 @@ public:
ZEN_UNUSED(GlobalOptions);
// Set output mode to handle virtual terminal sequences
+#if ZEN_PLATFORM_WINDOWS
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
if (hOut == INVALID_HANDLE_VALUE)
return GetLastError();
@@ -74,6 +75,7 @@ public:
dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
if (!SetConsoleMode(hOut, dwMode))
return GetLastError();
+#endif // ZEN_PLATFORM_WINDOWS
return doctest::Context(argc, argv).run();
}