[Lldb-commits] [lldb] [lldb] Implement a statusline in LLDB (PR	#121860)
    Jonas Devlieghere via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Fri Mar  7 09:41:29 PST 2025
    
    
  
================
@@ -1925,6 +1959,17 @@ void Debugger::CancelForwardEvents(const ListenerSP &listener_sp) {
   m_forward_listener_sp.reset();
 }
 
+bool Debugger::StatuslineSupported() {
+  if (GetShowStatusline()) {
+    if (lldb::LockableStreamFileSP stream_sp = GetOutputStreamSP()) {
+      File &file = stream_sp->GetUnlockedFile();
+      return file.GetIsInteractive() && file.GetIsRealTerminal() &&
+             file.GetIsTerminalWithColors();
----------------
JDevlieghere wrote:
We use support for colors as a way to determine whether we're in a smart terminal that supports the ANSI escape codes. That's what we do today for progress events and I'm pretty sure I saw that elsewhere too. 
https://github.com/llvm/llvm-project/pull/121860
    
    
More information about the lldb-commits
mailing list