Skip to content

[lldb] Improve default statusline colors to work with more color schemes #133315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

JDevlieghere
Copy link
Member

Use the reverse video [1] font effect (${ansi.negative}) as the default for the statusline. Inverting the foreground and background color has a better change as looking reasonably good, compared to picking an arbitrary color.

[1] https://en.wikipedia.org/wiki/Reverse_video

Use the reverse video [1] font effect (`${ansi.negative}`) as the
default for the statusline. Inverting the foreground and background
color has a better change as looking reasonably good, compared to
picking an arbitrary color.

[1] https://en.wikipedia.org/wiki/Reverse_video
@llvmbot
Copy link
Member

llvmbot commented Mar 27, 2025

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

Changes

Use the reverse video [1] font effect (${ansi.negative}) as the default for the statusline. Inverting the foreground and background color has a better change as looking reasonably good, compared to picking an arbitrary color.

[1] https://en.wikipedia.org/wiki/Reverse_video


Full diff: https://github.com/llvm/llvm-project/pull/133315.diff

1 Files Affected:

  • (modified) lldb/source/Core/CoreProperties.td (+1-1)
diff --git a/lldb/source/Core/CoreProperties.td b/lldb/source/Core/CoreProperties.td
index 01a04f9e79095..af9eb139f0921 100644
--- a/lldb/source/Core/CoreProperties.td
+++ b/lldb/source/Core/CoreProperties.td
@@ -178,7 +178,7 @@ let Definition = "debugger" in {
     Desc<"Whether to show a statusline at the bottom of the terminal.">;
   def StatuslineFormat: Property<"statusline-format", "FormatEntity">,
     Global,
-    DefaultStringValue<"${ansi.bg.blue}${ansi.fg.black}{${target.file.basename}}{ | ${line.file.basename}:${line.number}:${line.column}}{ | ${thread.stop-reason}}{ | {${progress.count} }${progress.message}}">,
+    DefaultStringValue<"${ansi.negative}{${target.file.basename}}{ | ${line.file.basename}:${line.number}:${line.column}}{ | ${thread.stop-reason}}{ | {${progress.count} }${progress.message}}">,
     Desc<"The default statusline format string.">;
   def UseSourceCache: Property<"use-source-cache", "Boolean">,
     Global,

Copy link
Collaborator

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the person who suggested this change, I think this is a great idea :-)

@JDevlieghere JDevlieghere merged commit c10e26b into llvm:main Mar 27, 2025
12 checks passed
@JDevlieghere JDevlieghere deleted the statusline-format-negative branch March 27, 2025 22:38
JDevlieghere added a commit to swiftlang/llvm-project that referenced this pull request Mar 29, 2025
…mes (llvm#133315)

Use the reverse video [1] font effect (`${ansi.negative}`) as the
default for the statusline. Inverting the foreground and background
color has a better change as looking reasonably good, compared to
picking an arbitrary color.

[1] https://en.wikipedia.org/wiki/Reverse_video

(cherry picked from commit c10e26b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants