]> granicus.if.org Git - neomutt/commit
eliminate MuttIndexWindow from mutt_copy_message()
authorRichard Russon <rich@flatcap.org>
Sat, 19 Oct 2019 15:53:57 +0000 (16:53 +0100)
committerRichard Russon <rich@flatcap.org>
Wed, 23 Oct 2019 10:37:44 +0000 (11:37 +0100)
commit9dbe02ed5bc5737333082e388e12680c24dac76c
tree87e343d038a0fb404e52d1af7971c7ee01dd5f29
parent95f35a2c74ac23a17a6f0368f669c9e13fb70bf7
eliminate MuttIndexWindow from mutt_copy_message()

`mutt_copy_message()` uses a huge tree of functions to process and copy
the header and body of a message.

Some of these functions perform wrapping and some of the wrapping
functions use `MuttIndexWindow` to get the width of the current panel.

These functions needed an extra parameter:

- `mutt_copy_hdr()`
- `mutt_copy_header()`
- `mutt_copy_message()`
- `mutt_copy_message_fp()`
- `mutt_write_one_header()`

The rest used an extra member in `struct State`.
For example, this sequence of functions:

- `mutt_body_handler()`
- `valid_pgp_encrypted_handler()`
- `run_decode_and_handler()`
- `crypt_pgp_encrypted_handler()`
- `pgp_gpgme_encrypted_handler()`
- `mutt_protected_headers_handler()`
15 files changed:
commands.c
copy.c
copy.h
editmsg.c
handler.c
maildir/shared.c
mbox/mbox.c
mutt_attach.c
ncrypt/crypt.c
ncrypt/smime.c
pattern.c
recvcmd.c
send.c
sendlib.c
state.h