================
@@ -41,10 +41,26 @@ Statusline::Statusline(Debugger &debugger)
 Statusline::~Statusline() { Disable(); }
 
 void Statusline::TerminalSizeChanged() {
-  UpdateTerminalProperties();
+  const uint64_t terminal_width = m_debugger.GetTerminalWidth();
+  const uint64_t terminal_height = m_debugger.GetTerminalHeight();
+
+  // Remember whether the terminal height changed.
+  const bool terminal_height_changed = terminal_height != m_terminal_height;
+
+  // Avoid clearing the old statusline if it's not visible (i.e. when the
+  // terminal height decreases), unless the width changed and the old 
statusline
+  // wrapped.
+  if (terminal_height > m_terminal_height || terminal_width < m_terminal_width)
----------------
labath wrote:

FWIW, my terminal is not wrapping the status line when the width decreases. In 
fact, it seems to be internally resetting (disabling) the scroll windows 
whenever the size changes.

https://github.com/llvm/llvm-project/pull/146435
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to