From 053c6ab4fd56a6b4c6168746eb92bb3b32ffc2ea Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Thu, 22 Apr 1999 10:09:22 +0000 Subject: [PATCH] Add "_" as an expando option. --- lib.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib.c b/lib.c index 047a5e45f..7f7c1c71c 100644 --- a/lib.c +++ b/lib.c @@ -1085,11 +1085,23 @@ void mutt_FormatString (char *dest, /* output buffer */ } else { + short tolower = 0; + + if (ch == '_') + { + ch = *src++; + tolower = 1; + } + /* use callback function to handle this case */ src = callback (buf, sizeof (buf), ch, src, prefix, ifstring, elsestring, data, flags); + if (tolower) + mutt_strlower (buf); + if ((len = mutt_strlen (buf)) + wlen > destlen) len = (destlen - wlen > 0) ? (destlen - wlen) : 0; + memcpy (wptr, buf, len); wptr += len; wlen += len; -- 2.40.0