]> git.deb.at Git - pkg/abook.git/commitdiff
cleanup
authorJaakko Heinonen <jheinonen@users.sourceforge.net>
Fri, 21 Dec 2001 10:08:11 +0000 (10:08 +0000)
committerJaakko Heinonen <jheinonen@users.sourceforge.net>
Fri, 21 Dec 2001 10:08:11 +0000 (10:08 +0000)
list.c
list.h

diff --git a/list.c b/list.c
index 6cb8ed791b8bd71065d62cd63657e7387cd50210..dddb84f45ddc0dc7a30a45ba6dc3aff10ab95a33 100644 (file)
--- 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 2b81cda6af49c1cd3897533a2f8378332c0a7d0b..8a92dc606ac9f1675a4dd61ab06c072fc9a08bc4 100644 (file)
--- 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();