From 116715270d07d18d101ff8d1b4a42cfd76c5cc55 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 8 Mar 2022 18:35:06 -0800 Subject: [PATCH] [lldb] Always move the cursor back after printing progress This got lost while iterating on the patch. We need to always move the cursor to the front of the line so that if something else (asynchronously) prints to the debugger's output it overwrites the progress message. --- lldb/source/Core/Debugger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 622dd66..39e83de 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -1813,7 +1813,7 @@ void Debugger::HandleProgressEvent(const lldb::EventSP &event_sp) { "%s", ansi::FormatAnsiTerminalCodes(ansi_suffix, use_color).c_str()); // Clear until the end of the line. - output.Printf("\x1B[K"); + output.Printf("\x1B[K\r"); // Flush the output. output.Flush(); -- 2.7.4