Re: [PATCH] Turn off curses meta() mode before exiting.
"Kevin J. McCarthy" <[email protected]> Wed, 24 Jun 2026 06:54:24 +0800
| Newsgroups | gmane.mail.mutt.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jun 23, 2026 at 05:08:28PM +0200, Vincent Lefevre wrote: >On 2026-06-22 13:30:06 +0800, Kevin J. McCarthy wrote: >> Ncurses does not change the mode back, thus leaving some terminals, >> such as foot, in a different state than when they started. >> --- >> >> This is a patch against stable branch. >> >> See gitlab ticket: https://gitlab.com/muttmua/mutt/-/work_items/528 >> and also the foot ticket referenced there at: >> https://codeberg.org/dnkl/foot/issues/2393 >> >> I also emailed Thomas Dickey to check with him about this. He >> confirmed that meta() is not reset. It's apparently a rarely set >> mode, and so he also advised to turn it back off before exiting. > >As I've said in the ticket, I'm wondering why Mutt changes the setting >in the first place. The terminal settings should be a user decision. I have no idea. It's in the first commit to git, so there are no comments. The keybindings in functions.h all have Esc-prefixes. There is a mutt option, $meta_key, default unset, but in the foot terminal, even setting this option doesn't make Alt-f/b work properly in the mutt line editor or elsewhere. I have to press Esc-f. I'll have to debug why. I will be glad to remove the ncurses call to meta() if that makes sense instead. Removing this call makes foot behavior properly in the mutt line editor and elsewhere. However, I worry about other terminal's behavior. Perhaps we'd have to announce that 8-bit mode is now under the users's control. I would need help with how to phrase this properly. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmo7DqAACgkQre92hIAx a9oNyRAAh8oXsleTXNkb5a6HrXe7PlNEhZ1POY0v6u90e6RZG5UpWIwTah/ZQWvf 8UtcBeGLmpy6dGM4St3ZmiJlI8xH7IJL+JxqqKtE3a/BPV5r7jmqNWKmEjejCt3N R2cTyurC+WBuGg+M2aRv6G8Tvwvz9wqd7VtFwS0jw5LyrDD5iEzTNt7hAt8foebs 9Q2WX3nNNDy8IBN22oPE3/lbKnA/E7PgqEzS2rYQyRDUcqEDlQ82JaHMhBntjEH2 nga+MmgtGkJNt8O79AZm2wvtSUFHU9RRTOAQZQuj8yaar/n4DUYPXrm9OOvkV3z0 O11P07ahsbBG/vO4WEY+hr0xbD1AE62hUswR8O9/f1gNFBZz5XbKjtApdoPUiKZx cl0bnMVtAIX3poKHwmU6J9Wc9ZnbbZOxtYBiJP/Thajdoc3lVMkViiqv8yXRt4bT 7Lbow2JXl+b2/PuNuOc5h62ZdEhoRc900KTR+d/Qzl7xxLd5TramzJZ584dJ13a9 DaHleH8dzpr57XxhwSQaNvwO/xE4Wk2wXfwPPt8OFCJHp04WnkdvUJtbpFXNpz8I yLPuatUsLmcTHTkd7/OGAqi1FAeZj1h6ZpridUi3rOdGnrb/Gan1AN/EKdEtsuA3 GZ+hcDMHTKpDXLkxPANSReNV1ggE72S7UG4R9LjTNBrrdWKUvvY= =1GgI -----END PGP SIGNATURE-----