diff options
author | Kevin McCarthy <kevin@8t8.us> | 2020-01-30 15:19:49 -0800 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2020-02-29 19:14:56 -0800 |
commit | c33d2e8b03e36e7e2bb6d29e851de94882758f7a (patch) | |
tree | 51b3668c3f5c6ba30e7d35b29f0a95e299a51d5c /edit.c | |
parent | 3b3186c2ce58a5bf56af60ce3f122f2955274eac (diff) |
Pass sctx to mutt_builtin_editor() and mutt_edit_headers().
This will be used to set the sctx signas instead of globals for header
editing.
Diffstat (limited to 'edit.c')
-rw-r--r-- | edit.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -316,8 +316,10 @@ static void be_edit_header (ENVELOPE *e, int force) } } -int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur) +int mutt_builtin_editor (SEND_CONTEXT *sctx) { + HEADER *msg, *cur; + const char *path; char **buf = NULL; int bufmax = 0, buflen = 0; char tmp[LONG_STRING]; @@ -326,6 +328,10 @@ int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur) int i; char *p; + msg = sctx->msg; + cur = sctx->cur; + path = sctx->msg->content->filename; + scrollok (stdscr, TRUE); be_edit_header (msg->env, 0); @@ -450,7 +456,7 @@ int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur) if (option (OPTEDITHDRS)) { mutt_env_to_local (msg->env); - mutt_edit_headers (NONULL(Visual), path, msg, NULL); + mutt_edit_headers (NONULL(Visual), sctx); if (mutt_env_to_intl (msg->env, &tag, &err)) printw (_("Bad IDN in %s: '%s'\n"), tag, err); } |