Open whitney-cumber opened 1 year ago
I like the idea of putting Encrypt with: in a separate line
Place
Encrypt with:
header in a separate line likeSign as:
(I never understood why this wasn't the case.)
Mutt's Compose drawing code is a desperate mess of hard-coded positions. They have a fixed size of window for the envelope.
A few years ago, I rewrote the Compose dialog to have a fluid layout. This means making the change you've suggested should be fairly straightforward.
Demo of Compose fluid layout: https://vimeo.com/407231157
Most dialogs, including Compose, have two phases of drawing: recalc()
and repaint()
https://neomutt.org/code/group__window__api.html
recalc()
does the "slow" work of generating any data needed for display.
repaint()
just paints the screen (and should be "fast").
Here's the code layout for the Compose Envelope Window
graph LR
calc_envelope --> calc_address
calc_envelope --> calc_security
calc_envelope --> calc_user_hdrs
draw_crypt_lines --> draw_floating
draw_crypt_lines --> draw_header
draw_envelope --> draw_crypt_lines
draw_envelope --> draw_envelope_addr
draw_envelope --> draw_envelope_user_hdrs
draw_envelope --> draw_header
draw_envelope --> draw_mix_line
draw_envelope_addr --> draw_header
draw_envelope_user_hdrs --> draw_header
draw_envelope_user_hdrs --> draw_header_content
draw_mix_line --> draw_header
env_recalc --> calc_envelope
env_repaint --> draw_envelope
Determine how many lines we'll need: https://github.com/neomutt/neomutt/blob/64701f92be2921611c9907472ecf6005e17d20f1/envelope/window.c#L263
Actually draw them: https://github.com/neomutt/neomutt/blob/64701f92be2921611c9907472ecf6005e17d20f1/envelope/window.c#L389
Would anyone like to have a go at this?
Expected Behaviour
No trunction in the
Security:
header line of the compose menuActual Behaviour
The (top part of the) compose menu looks like
Note the trunctation of
(OppEnc mode)
to(OppEnc m
.Steps to Reproduce
Use opportunistic encryption together with S/MIME, e.g. this neomuttrc-oppenc-smime
neomutt -F neomuttrc-oppenc-smime -- foo@example.org
Important: you need the certificate for foo@example.org in order for opportunistic encryption to kick in and encrypt the message.The "(OppEnc mode)" is truncated
Suggestion
Place
Encrypt with:
header in a separate line likeSign as:
(I never understood why this wasn't the case.)NeoMutt Version