Skip to content

Conversation

@egmontkob
Copy link
Contributor

Proposed changes

Fix & update the black and white skin. Followup internal cleanup.

Checklist

👉 Our coding style can be found here: https://midnight-commander.org/coding-style/ 👈

  • I have referenced the issue(s) resolved by this PR (if any)
  • I have signed-off my contribution with git commit --amend -s
  • Lint and unit tests pass locally with my changes (make indent && make check)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)

@github-actions github-actions bot added needs triage Needs triage by maintainers prio: medium Has the potential to affect progress labels Feb 2, 2026
@github-actions github-actions bot added this to the Future Releases milestone Feb 2, 2026
@egmontkob egmontkob added area: skin Theming support and skin files prio: low Minor problem or easily worked around and removed prio: medium Has the potential to affect progress needs triage Needs triage by maintainers labels Feb 2, 2026
@egmontkob egmontkob modified the milestones: Future Releases, 4.9.0 Feb 2, 2026
@egmontkob egmontkob requested review from mc-worker and zyv February 2, 2026 14:10
Its look was vastly different under ncurses (2 colors) vs. slang (4 colors).
Go for 2 colors only, since this is a last resort fallback.

The selected file, if marked as well, is no longer invisible.

Restrict the attributes to bold, reversed, and the combination of these two.
Don't use underlined text, since terminals where this mode is necessary are
unlikely to support it.

Various other minor tweaks and updates were also made.

Those who have a powerful terminal, yet look for a simple look consisting of
maybe 4 grayscale colors and decorations like underline, should create such
a skin rather than relying on this hardcoded one.

Signed-off-by: Egmont Koblinger <egmont@gmail.com>
@egmontkob
Copy link
Contributor Author

The combination of Slang with TERM=xtermm (and no COLORTERM) doesn't work as expected. The error dialog is reversed (although, according to the definitions, it shouldn't), and there's no highlight on the help pages.

As if there was another hardwired skin...?

Weird. Investigating...

…e colors

These were only used internally by the hardcoded black and white skin,
up until the previous commit.

Signed-off-by: Egmont Koblinger <egmont@gmail.com>
@egmontkob
Copy link
Contributor Author

(Side note: TERM=xterm-mono might be a better choice for testing, since the arrow keys work there.)

No, there isn't another hardwired skin.

With mono TERM values, combined with Slang's color-aware methods, the "bold" flag becomes "reverse" instead. So if either of the properties (or both) are present, you get reverse video, and never bold.

(The same color-aware methods work properly if you pass "default" for both colors, i.e. restrict yourself not to use any colors, however TERM describes a color-aware terminal.)

I suspect this might be a Slang bug, or a pretty unfortunate design decision. Anyway, I've worked it around.

@zyv
Copy link
Member

zyv commented Feb 3, 2026

Just tested on AIX (this is built with S-Lang, before all drawing characters were broken):

Screenshot 2026-02-03 at 09 23 32

It's looking better and better, but != signs still remain, no idea why.

Copy link
Member

@zyv zyv left a comment

Choose a reason for hiding this comment

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

Oh, that bugged me last time I worked on AIX. I agree with simplifying stuff. Thank you!

@egmontkob
Copy link
Contributor Author

Just tested on AIX (this is built with S-Lang, before all drawing characters were broken):

Sorry, I'm really not following this comment.

The screenshot was taken without my patch, as per the commit ID shown. Does my patch change the colors in a notable way (for better or worse)?

By breaking all drawing characters do you mean that at some point real lines were replaced by - + , or did they become even more broken with my patch?

Could you please file a bugreport for the broken lines with the details?

The ACS variant of | is , while - and + stay intact. printf $'\e)0\x0E - + | \e)0\x0F\n' prints - + ≠. Surely this is what happens somewhere, the question is where, why, whose fault is that.

@zyv
Copy link
Member

zyv commented Feb 3, 2026

The screenshot was taken without my patch, as per the commit ID shown. Does my patch change the colors in a notable way (for better or worse)?

It is with your patch, and it makes it better. Your changes are in a different repository, and it's hard for me to check them out there. So I rolled the patch up manually. Black and white now makes sense. Before it was still black and white, somehow not consistent.

By breaking all drawing characters do you mean that at some point real lines were replaced by - + , or did they become even more broken with my patch?

Before (not long after 4.8.33), all characters were completely randomly broken. Now, as you can see, the only weird stuff I can notice now is ≠. So the work you did before must have led to these improvements. I'm not sure why ≠ is not replaced.

Could you please file a bugreport for the broken lines with the details?

I'm not sure what I should put in the report. If you log into cfarm119 and run mc, you should see what I see. The source is in ~src/mc.

@egmontkob
Copy link
Contributor Author

If you log into cfarm119 and run mc

Yup, I see this. The printed escape sequence is somewhat different, equivalent to printf '\e(0 - + | \e(B', but essentially the same story.

I'm not sure what I should put in the report.

Whatever we already know about the story, plus the screenshot :)

By the way, did you tamper with mc's config in some way? In my opinion, the first question is not why there are symbols instead of |. the first question is why doesn't mc fully shine in colors and proper line drawing chars; do you happen to know this?

xterm, xterm-256color and even xterm-direct256 terminfos seem to be properly installed. TERM=xterm infocmp -a produces essentially the same output as on Linux, the only functional difference is kbs=^H vs. kbs=^? which is irrelevant.

Maybe slang wasn't built with color support or cannot locate the terminfo database or something like this?

At this point I'd bet it's a slang misconfiguration + a slang bug triggered by this misconfiguration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: skin Theming support and skin files prio: low Minor problem or easily worked around

Development

Successfully merging this pull request may close these issues.

Remove "SPEC_A_*" colors -b, --nocolor options not working usefully

2 participants