+
+ wattrset(editw, COLOR_PAIR(CP_FIELD_VALUE));
+ if((cur->field->type == FIELD_EMAILS) ||
+ (cur->field->type == FIELD_LIST)) {
+ abook_list *emails, *e;
+
+ find_field_number(cur->field->key, &nb);
+ emails = csv_to_abook_list(db_fget_byid(item, nb));
+
+ for(e = emails; e; e = e->next) {
+ getyx(editw, y, x);
+ mvwaddnstr(editw, y + 1, TAB_COLON_POS + 2,
+ e->data,
+ bytes2width(e->data,
+ FIELD_MAX_WIDTH));
+ mvwaddch(editw, y + 1, TAB_COLON_POS,
+ UI_VLINE_CHAR);
+ }
+ if(emails) {
+ mvwaddch(editw, y + 2, TAB_COLON_POS,
+ UI_LLCORNER_CHAR);
+ mvwhline(editw, y + 2, TAB_COLON_POS + 1,
+ UI_HLINE_CHAR,
+ EDITW_COLS - TAB_COLON_POS - 2);
+ }
+ abook_list_free(&emails);
+ } else if(cur->field->type == FIELD_DATE) {
+ int day, month, year;
+ char buf[64];
+
+ find_field_number(cur->field->key, &nb);
+ str = db_fget_byid(item, nb);
+
+ if(parse_date_string(str, &day, &month, &year)) {
+ /* put locale representation of date in buf */
+ locale_date(buf, sizeof(buf), year, month, day);
+ mvwaddnstr(editw, y, TAB_COLON_POS + 2, buf,
+ bytes2width(buf, FIELD_MAX_WIDTH));
+ }
+ } else {
+ find_field_number(cur->field->key, &nb);
+ str = safe_str(db_fget_byid(item, nb));
+ mvwaddnstr(editw, y, TAB_COLON_POS + 2, str,
+ bytes2width(str, FIELD_MAX_WIDTH));
+ }