[Lldb-commits] [lldb] 55b9515 - [lldb] Avoid flickering by not clearing the statusline when redrawing
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 26 23:35:43 PDT 2025
Author: Jonas Devlieghere
Date: 2025-03-26T23:35:36-07:00
New Revision: 55b95151d2a618b12156730962e109b3d5fa67b1
URL: https://github.com/llvm/llvm-project/commit/55b95151d2a618b12156730962e109b3d5fa67b1
DIFF: https://github.com/llvm/llvm-project/commit/55b95151d2a618b12156730962e109b3d5fa67b1.diff
LOG: [lldb] Avoid flickering by not clearing the statusline when redrawing
When redrawing the statusline, the current implementation would clear
the current line before drawing the new content. Since we always
overwrite the whole statusline from beginning to end, there's no need to
clear it and we can avoid the potential for flickering.
Added:
Modified:
lldb/source/Core/Statusline.cpp
Removed:
################################################################################
diff --git a/lldb/source/Core/Statusline.cpp b/lldb/source/Core/Statusline.cpp
index 2418a03ba40c5..c01388eb7e7b5 100644
--- a/lldb/source/Core/Statusline.cpp
+++ b/lldb/source/Core/Statusline.cpp
@@ -75,7 +75,6 @@ void Statusline::Draw(std::string str) {
locked_stream << ANSI_SAVE_CURSOR;
locked_stream.Printf(ANSI_TO_START_OF_ROW,
static_cast<unsigned>(m_terminal_height));
- locked_stream << ANSI_CLEAR_LINE;
locked_stream << str;
locked_stream << ANSI_NORMAL;
locked_stream << ANSI_RESTORE_CURSOR;
More information about the lldb-commits
mailing list