Show
Ignore:
Timestamp:
2000-06-15 14:14:29 (8 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

patch-1.3.2.bbell.complete.1 - autocomplete "!", which is helpful
in certain IMAP contexts.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • complete.c

    r1601 r1908  
    4949 
    5050  /* we can use '/' as a delimiter, imap_complete rewrites it */ 
    51   if (*s == '=' || *s == '+') 
    52   { 
     51  if (*s == '=' || *s == '+' || *s == '!') 
     52  { 
     53    if (*s == '!') 
     54      p = Spoolfile; 
     55    else 
     56      p = Maildir; 
    5357    if (s[1]) 
    5458    { 
    55       /* don't append '/' if Maildir is {host} only */ 
    56       if (mx_is_imap (NONULL (Maildir)) && Maildir[strlen (Maildir)-1] == '}') 
    57         snprintf (imap_path, sizeof (imap_path), "%s%s", Maildir, s+1); 
     59      /* don't append '/' if Maildir/Spoolfile is {host} only */ 
     60      if (mx_is_imap (NONULL (p)) && p[strlen (p)-1] == '}') 
     61        snprintf (imap_path, sizeof (imap_path), "%s%s", p, s+1); 
    5862      else 
    59         snprintf (imap_path, sizeof (imap_path), "%s/%s", NONULL (Maildir), 
     63        snprintf (imap_path, sizeof (imap_path), "%s/%s", NONULL (p), 
    6064          s+1); 
    6165    } 
    6266    else 
    63       strfcpy (imap_path, NONULL(Maildir), sizeof(imap_path)); 
     67      strfcpy (imap_path, NONULL(p), sizeof(imap_path)); 
    6468  } 
    6569  else 
     
    7074#endif 
    7175   
    72   if (*s == '=' || *s == '+') 
     76  if (*s == '=' || *s == '+' || *s == '!') 
    7377  { 
    7478    dirpart[0] = *s; 
    7579    dirpart[1] = 0; 
    76     strfcpy (exp_dirpart, NONULL (Maildir), sizeof (exp_dirpart)); 
     80    if (*s == '!') 
     81      strfcpy (exp_dirpart, NONULL (Spoolfile), sizeof (exp_dirpart)); 
     82    else 
     83      strfcpy (exp_dirpart, NONULL (Maildir), sizeof (exp_dirpart)); 
    7784    if ((p = strrchr (s, '/'))) 
    7885    {