[all-commits] [llvm/llvm-project] 5f99e0: [lldb] Use the "reverse video" effect when colors ...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Apr 3 13:51:39 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5f99e0d4b9ea071e29a9cba75619d26811ff76c2
      https://github.com/llvm/llvm-project/commit/5f99e0d4b9ea071e29a9cba75619d26811ff76c2
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2025-04-03 (Thu, 03 Apr 2025)

  Changed paths:
    M lldb/source/Core/Statusline.cpp
    M lldb/test/API/functionalities/statusline/TestStatusline.py

  Log Message:
  -----------
  [lldb] Use the "reverse video" effect when colors are disabled. (#134203)

When you run lldb without colors (`-X`), the status line looks weird
because it doesn't have a background. You end up with what appears to be
floating text at the bottom of your terminal.

This patch changes the statusline to use the reverse video effect, even
when colors are off. The effect doesn't introduce any new colors and
just inverts the foreground and background color.

I considered an alternative approach which changes the behavior of the
`-X` option, so that turning off colors doesn't prevent emitting
non-color related control characters such as bold, underline, and
reverse video. I decided to go with this more targeted fix as (1) nobody
is asking for this more general change and (2) it introduces significant
complexity to plumb this through using a setting and driver flag so that
it can be disabled when running the tests.

Fixes #134112.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list