Show
Ignore:
Timestamp:
2007-04-11 22:36:24 (20 months ago)
Author:
Michael Elkins <me@…>
Branch:
HEAD
Message:

Pass column value recursively when expanding format strings (bug #2840).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • compose.c

    r5010 r5137  
    100100static void snd_entry (char *b, size_t blen, MUTTMENU *menu, int num) 
    101101{ 
    102     mutt_FormatString (b, blen, NONULL (AttachFormat), mutt_attach_fmt, 
     102    mutt_FormatString (b, blen, 0, NONULL (AttachFormat), mutt_attach_fmt, 
    103103            (unsigned long)(((ATTACHPTR **) menu->data)[num]), 
    104104            M_FORMAT_STAT_FILE | M_FORMAT_ARROWCURSOR); 
     
    407407 
    408408/* prototype for use below */ 
    409 static void compose_status_line (char *buf, size_t buflen, MUTTMENU *menu,  
     409static void compose_status_line (char *buf, size_t buflen, size_t col, MUTTMENU *menu,  
    410410      const char *p); 
    411411 
     
    423423 
    424424static const char * 
    425 compose_format_str (char *buf, size_t buflen, char op, const char *src, 
     425compose_format_str (char *buf, size_t buflen, size_t col, char op, const char *src, 
    426426                   const char *prefix, const char *ifstring, 
    427427                   const char *elsestring, 
     
    466466 
    467467  if (optional) 
    468     compose_status_line (buf, buflen, menu, ifstring); 
     468    compose_status_line (buf, buflen, col, menu, ifstring); 
    469469  else if (flags & M_FORMAT_OPTIONAL) 
    470     compose_status_line (buf, buflen, menu, elsestring); 
     470    compose_status_line (buf, buflen, col, menu, elsestring); 
    471471 
    472472  return (src); 
    473473} 
    474474 
    475 static void compose_status_line (char *buf, size_t buflen, MUTTMENU *menu,  
     475static void compose_status_line (char *buf, size_t buflen, size_t col, MUTTMENU *menu,  
    476476      const char *p) 
    477477{ 
    478   mutt_FormatString (buf, buflen, p, compose_format_str,  
     478  mutt_FormatString (buf, buflen, col, p, compose_format_str,  
    479479        (unsigned long) menu, 0); 
    480480} 
     
    12761276    if (menu->redraw & REDRAW_STATUS)  
    12771277    { 
    1278         compose_status_line (buf, sizeof (buf), menu, NONULL(ComposeFormat)); 
     1278        compose_status_line (buf, sizeof (buf), 0, menu, NONULL(ComposeFormat)); 
    12791279        CLEARLINE (option (OPTSTATUSONTOP) ? 0 : LINES-2); 
    12801280        SETCOLOR (MT_COLOR_STATUS);