SpoolFile = mutt_str_strdup(buffer);
}
- p = mutt_str_getenv("VISUAL");
- if (!p)
- {
- p = mutt_str_getenv("EDITOR");
- if (!p)
- p = "vi";
- }
- Editor = mutt_str_strdup(p);
- Visual = mutt_str_strdup(p);
-
p = mutt_str_getenv("REPLYTO");
if (p)
{
if (env_tmp)
mutt_str_replace(&Tmpdir, env_tmp);
+ /* "$visual", "$editor" precedence: environment, config file, code */
+ const char *env_ed = mutt_str_getenv("VISUAL");
+ if (!env_ed)
+ env_ed = mutt_str_getenv("EDITOR");
+ if (env_ed)
+ {
+ mutt_str_replace(&Editor, env_ed);
+ mutt_str_replace(&Visual, env_ed);
+ }
+
if (need_pause && !OPT_NO_CURSES)
{
log_queue_flush(log_disp_terminal);
** \fBNote\fP that changes made to the References: and Date: headers are
** ignored for interoperability reasons.
*/
- { "editor", DT_PATH, R_NONE, &Editor, 0 },
+ { "editor", DT_PATH, R_NONE, &Editor, IP "vi" },
/*
** .pp
** This variable specifies which editor is used by NeoMutt.
** virtual-mailboxes) as a spool file.
*/
#endif
- { "visual", DT_PATH, R_NONE, &Visual, 0 },
+ { "visual", DT_PATH, R_NONE, &Visual, IP "vi" },
/*
** .pp
** Specifies the visual editor to invoke when the ``\fC~v\fP'' command is
** given in the built-in editor.
+ ** .pp
+ ** $$visual is overridden by the environment variable \fC$$$VISUAL\fP.
*/
{ "wait_key", DT_BOOL, R_NONE, &WaitKey, 1 },
/*