print_list_line(i, line, i == curitem);
}
+ if(opt_get_bool(BOOL_SHOW_CURSOR)) {
+ wmove(list, curitem - first_list_item, 0);
+ /* need to call refresh() to update the cursor positions */
+ refresh();
+ }
wrefresh(list);
}
if(selected[i])
mvwaddch(list, line, 0, '*' );
- mvwaddnstr(list, line, NAMEPOS, database[i][NAME], NAMELEN);
+ mvwaddnstr(list, line, NAMEPOS, database[i][NAME],
+ bytes2width(database[i][NAME], NAMELEN));
if(opt_get_bool(BOOL_SHOW_ALL_EMAILS))
mvwaddnstr(list, line, EMAILPOS, database[i][EMAIL],
- real_emaillen);
+ bytes2width(database[i][EMAIL], real_emaillen));
else {
get_first_email(tmp, i);
- mvwaddnstr(list, line, EMAILPOS, tmp, real_emaillen);
+ mvwaddnstr(list, line, EMAILPOS, tmp,
+ bytes2width(tmp, real_emaillen));
}
if(extra < 0 || !database[i][extra])
extra = extra_alternative;
if(extra >= 0)
mvwaddnstr(list, line, EXTRAPOS,
- safe_str(database[i][extra]),
- EXTRALEN);
+ safe_str(database[i][extra]),
+ bytes2width(safe_str(database[i][extra]), EXTRALEN));
scrollok(list, TRUE);
if(highlight)
void
list_headerline()
{
-#ifdef A_BOLD
+#if defined(A_BOLD) && defined(A_NORMAL)
attrset(A_BOLD);
-#else
- /* hmm, maybe something here */
#endif
mvaddstr(2, NAMEPOS, abook_fields[NAME].name);
mvaddstr(2, EMAILPOS, abook_fields[EMAIL].name);
if(extra_column > 0)
mvaddnstr(2, EXTRAPOS, abook_fields[extra_column].name,
COLS-EXTRAPOS);
-#ifdef A_BOLD
+#if defined(A_BOLD) && defined(A_NORMAL)
attrset(A_NORMAL);
#endif
}
refresh_list();
}
-
void
select_none()
{