From 8736d42793b39dd0d6c5e22c0500a7fa88f32bf5 Mon Sep 17 00:00:00 2001 From: Derek Huang Date: Tue, 12 May 2026 00:17:42 -0400 Subject: [PATCH] ctest: Fix progress summary line erasure on Windows We only print progress output when VT100 escapes are supported, even on Windows, so we can erase the line there too. Fixes: #27814 Issue: #26924 --- Source/cmCTest.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 6ead9771bb..b11ef4ffb4 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -3411,9 +3411,9 @@ void cmCTest::Log(LogType logType, std::string msg, bool suppress) } std::cout << msg; -#ifndef _WIN32 - printf("\x1B[K"); // move caret to end -#endif + // ProgressOutputSupportedByConsole() already verified VT100 support. + // Erase the rest of the line before printing the message. + printf("\x1B[K"); std::cout.flush(); return; }