[Lldb-commits] [lldb] [lldb] Turn on OSC 9; 4 graphical progress in supported terminals (PR #185541)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 11 04:03:44 PDT 2026


================
@@ -2077,6 +2077,30 @@ void Debugger::CancelForwardEvents(const ListenerSP &listener_sp) {
   m_forward_listener_sp.reset();
 }
 
+/// Conservative heuristic to detect whether OSC 9;4 progress is supported by
+/// the current terminal.
+static bool TerminalSupportsOSCProgress() {
+  static std::once_flag g_once_flag;
+  static bool g_supports_osc_progress = false;
+
+  std::call_once(g_once_flag, []() {
+    std::array<const char *, 4> g_known_env_vars = {
+        "WT_SESSION",            // Windows Terminal
----------------
charles-zablit wrote:

I think that's reasonable for now yes, as it matches what we do for unicode detection and has been working as expected since 22.x was released.

As a follow up, I think we could implement a check for `ENABLE_VIRTUAL_TERMINAL_PROCESSING` as suggested by the Windows Terminal maintainer (@DHowett) and share that logic with the check you implemented.

https://github.com/llvm/llvm-project/pull/185541


More information about the lldb-commits mailing list