From: Jaakko Heinonen Date: Fri, 21 Dec 2001 10:08:11 +0000 (+0000) Subject: cleanup X-Git-Tag: upstream/0.6.1~2^2~313 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=f16a3a0e70320b746a9bdafe71dffff4b5ec71d9;p=pkg%2Fabook.git cleanup --- diff --git a/list.c b/list.c index 6cb8ed7..dddb84f 100644 --- a/list.c +++ b/list.c @@ -109,10 +109,7 @@ refresh_list() for( line = 0, i = first_list_item ; i <= LAST_LIST_ITEM && i < items; line++, i++ ) { - if(i == curitem) - highlight_line(list, line); - - print_list_line(i, line); + print_list_line(i, line, i == curitem); wstandend(list); } @@ -121,7 +118,7 @@ refresh_list() } void -print_list_line(int i, int line) +print_list_line(int i, int line, int highlight) { int extra = extra_column; char tmp[MAX_EMAILSTR_LEN]; @@ -129,6 +126,8 @@ print_list_line(int i, int line) EMAILLEN : COLS - EMAILPOS; scrollok(list, FALSE); + if(highlight) + highlight_line(list, line); if( selected[i] ) mvwaddch(list, line, 0, '*' ); @@ -150,6 +149,8 @@ print_list_line(int i, int line) EXTRALEN); scrollok(list, TRUE); + if(highlight_line) + wstandend(list); } diff --git a/list.h b/list.h index 2b81cda..8a92dc6 100644 --- a/list.h +++ b/list.h @@ -6,7 +6,7 @@ void init_list(); void close_list(); void refresh_list(); -void print_list_line(int i, int line); +void print_list_line(int i, int line, int highlight); void list_headerline(); void scroll_up(); void scroll_down();