On Thu, Jun 25, 2026 at 18:30 +0800, Kevin J. McCarthy wrote:
Ah, I figured out what foot is doing with meta enabled, (and xterm
without any metaSendsEscape settings).
If I type Alt-p, the terminal converts 'p', 0x70, to 0xF0, by flipping
the high bit. But then it encodes that in utf-8 and sends that to
mutt. So mutt receives 0xC3 0xB0 in two getch() calls.
It's a mess.
That sounds like a bug in foot, or maybe a misconfiguration. It should
do at most one of those things, not both.
I've never used foot, but I find the comparable configuration of xterm
to be tricky. It took me a few tries and some reading just now, even
though I've done it before.
In xterm, what the Meta (Alt) key does depends on the resources
eightBitInput, eightBitMeta, and metaSendsEscape, and also on locale.
There are a couple other resources that can affect it, too.
Anyway, I agree that it's probably best to remove Mutt's call to the
ncurses function meta().
I'm actually pondering pushing this commit to stable and releasing it
with 2.4.1. Feedback?
Ehh...maybe try foot again? It really shouldn't do what you describe above.