ssize_t m_strformat(char *dst, ssize_t dlen, const char *fmt,
format_t *callback, unsigned long data, format_flag flags)
{
- ssize_t pos = (flags & M_FORMAT_ARROWCURSOR && option (OPTARROWCURSOR)) ? 3 : 0;
+ ssize_t pos = flags & M_FORMAT_ARROWCURSOR ? 3 : 0;
while (*fmt) {
char ifstring[STRING], elsestring[STRING], prefix[STRING] = "";
}
return pos; /* skip rest of input */
- case '|':
- col = mutt_strwidth(dst);
-
- ch = *fmt++;
- /* pad to EOL */
- pos += m_strpad(dst + pos, dlen - pos, ch, COLS - SW - col);
- return pos; /* skip rest of input */
+ case '|': /* pad to EOL */
+ return pos + m_strpad(dst + pos, dlen - pos, *fmt,
+ COLS - SW - mutt_strwidth(dst));
default:
lower = nodots = 0;