Show
Ignore:
Timestamp:
2001-09-11 04:20:34 (7 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

The addressbook used to crash when someone issued the alias and
unalias commands while on that menu. This patch has a basic fix for
this behaviour, and adds delete and undelete functions to this menu.
While I'm on it, I've also made sure that "apply-tag" untags
everything on all menus.

The original crash was noted by Oliver Kauss <kauss@…>.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • browser.c

    r2413 r2578  
    508508} 
    509509 
    510 int file_tag (MUTTMENU *menu, int n) 
     510int file_tag (MUTTMENU *menu, int n, int m) 
    511511{ 
    512512  struct folder_file *ff = &(((struct folder_file *)menu->data)[n]); 
     513  int ot; 
    513514  if (S_ISDIR (ff->mode) || (S_ISLNK (ff->mode) && link_is_dir (LastDir, ff->name))) 
    514515  { 
     
    517518  } 
    518519   
    519   return ((ff->tagged = !ff->tagged) ? 1 : -1); 
     520  ot = ff->tagged; 
     521  ff->tagged = (m >= 0 ? m : !ff->tagged); 
     522   
     523  return ff->tagged - ot; 
    520524} 
    521525