ret = *database[item][EMAIL] ?
mkstr("%s <%s>", name, email) :
- name;
+ strdup(name);
free(name);
if( is_valid_item(item) )
mailstr = make_mailstr(item);
-
- /*
- * need to implement for multiple addresses
- */
- /*
- } else {
+ else {
struct db_enumerator e = init_db_enumerator(ENUM_SELECTED);
+ char *tmp = NULL;
db_enumerate_items(e) {
tmp = mailstr;
- mailstr = strconcat(tmp, make_mailstr(e.item);
-
- }*/
+ mailstr = tmp ?
+ strconcat(tmp, ",", make_mailstr(e.item), NULL):
+ strconcat(make_mailstr(e.item), NULL);
+ free(tmp);
+ }
+ }
cmd = strconcat(options_get_str("mutt_command"), " \'", mailstr,
"\'", NULL);
case 'r': roll_emails(item); break;
case '?': display_help(HELP_EDITOR); break;
case 'u': edit_undo(item, RESTORE_ITEM); break;
- case 'm': launch_mutt(item); break;
- case 'v': launch_wwwbrowser(item); break;
+ case 'm': launch_mutt(item); clearok(stdscr, 1); break;
+ case 'v': launch_wwwbrowser(item); clearok(stdscr, 1); break;
case 12 : clearok(stdscr, 1); break; /* ^L (refresh screen) */
default: return edit_field(tab, c, item) ? item : -1;
}
case 'Z': move_curitem(MOVE_ITEM_DOWN);
break;
- case 'm': launch_mutt(list_current_item());
+ case 'm': launch_mutt(selected_items() ?
+ -1 : list_current_item());
refresh_screen();
break;