On Wed, Jun 24, 2026 at 04:29:11PM +0200, Vincent Lefevre wrote:
On 2026-06-24 06:56:51 +0800, Kevin J. McCarthy wrote:On Tue, Jun 23, 2026 at 05:42:58PM -0400, Kurt Hackenberg wrote: > On Mon, Jun 22, 2026 at 13:30 +0800, Kevin J. McCarthy wrote: > > > +/* Before exiting, turn off features enabled in start_curses() that > > + * are not reversed by endwin(). > > + */ > > +void mutt_curses_cleanup(void) > > +{ > > +#if HAVE_META > > + meta(stdscr, FALSE); > > +#endif > > +} > > Shouldn't Mutt only turn off that mode if it was off when Mutt started?I don't know how to check that via curses.is_meta() is missing for that, and according to the meta(3ncurses) man page, there isn't a fixed default. So I would say that changing the meta status is incorrect, or it should be controlled by an option so that the user would explicitly tell Mutt when to set meta to TRUE or FALSE. Moreover, according to the discussion, the meta status does not belong to the curses window, but to the terminal. So, if a user really needs it, this could be done *outside* of Mutt. In short, Mutt does not need to care about it. BTW, I suppose that meta() applies to the top-level terminal. So I'm wondering whether it also clashes with GNU Screen or tmux (but perhaps their terminfo settings disable this old feature).
Thanks Vincent. I'm inclined to remove the meta() call and announce it loudly.I could add a mutt configuration option, but it would be a little awkward: curses is initialized before the init files are read because the init files make color declarations (requiring an initialized curses).
Yes, I could add a separate post-init call to this, but it seems like a lot of effort for an old curses feature of dubious value. And, as you said, if users want it, they can set it in their terminal configuration.
If anyone feels differently let me know, otherwise I'll commit this over the weekend and close the gitlab ticket.
-- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
Description: PGP signature
