From: Richard Russon Date: Sun, 22 Jul 2018 20:15:04 +0000 (+0100) Subject: except pager=builtin X-Git-Tag: 2019-10-25~741 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33ea0ae4f9545823910ba79b4214b9a57bf651fb;p=neomutt except pager=builtin --- diff --git a/init.c b/init.c index adc740e9c..45296636f 100644 --- a/init.c +++ b/init.c @@ -2202,18 +2202,23 @@ static int parse_set(struct Buffer *buf, struct Buffer *s, unsigned long data, { char scratch[PATH_MAX]; mutt_str_strfcpy(scratch, buf->data, sizeof(scratch)); - mutt_expand_path(scratch, sizeof(scratch)); - size_t scratchlen = mutt_str_strlen(scratch); - if (scratchlen != 0) + if ((mutt_str_strcmp(MuttVars[idx].name, "pager") != 0) || + (mutt_str_strcmp(buf->data, "builtin") != 0)) { - if ((scratch[scratchlen - 1] != '|') && /* not a command */ - (url_check_scheme(scratch) == U_UNKNOWN)) /* probably a local file */ + mutt_expand_path(scratch, sizeof(scratch)); + + size_t scratchlen = mutt_str_strlen(scratch); + if (scratchlen != 0) { - struct ListNode *np = STAILQ_FIRST(&MuttrcStack); - if (!mutt_file_to_absolute_path(scratch, np ? NONULL(np->data) : "./")) + if ((scratch[scratchlen - 1] != '|') && /* not a command */ + (url_check_scheme(scratch) == U_UNKNOWN)) /* probably a local file */ { - mutt_error(_("Error: impossible to build path of '%s'."), scratch); + struct ListNode *np = STAILQ_FIRST(&MuttrcStack); + if (!mutt_file_to_absolute_path(scratch, np ? NONULL(np->data) : "./")) + { + mutt_error(_("Error: impossible to build path of '%s'."), scratch); + } } } }