From: Jaakko Heinonen Date: Mon, 19 Apr 2004 06:53:06 +0000 (+0000) Subject: wrap searches X-Git-Tag: upstream/0.6.1~2^2~212 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=d041671666ce466d37068a937cab7245a5952687;p=pkg%2Fabook.git wrap searches --- diff --git a/ChangeLog b/ChangeLog index 954d284..c352eab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 0.5.3 - removed a lefover debug message - fixed mutt import filter nickname cutoff + - wrap searches 0.5.2 - five custom fields added diff --git a/abook.c b/abook.c index fe37f71..debd3f6 100644 --- a/abook.c +++ b/abook.c @@ -748,12 +748,12 @@ add_email_add_item(int quiet, char *name, char *email) "you may want to use --add-email-quiet\n"); exit(1); } - printf("Add ``%s <%s>'' to %s ? (y/n)\n", - name, - email, - datafile - ); + do { + printf("Add ``%s <%s>'' to %s ? (y/n)\n", + name, + email, + datafile); c = fgetc(in); if(c == 'n' || c == 'N') { fclose(in); diff --git a/configure b/configure index 6844deb..a32a6e2 100755 --- a/configure +++ b/configure @@ -1605,7 +1605,7 @@ fi # Define the identity of the package. PACKAGE=abook - VERSION=0.5.2pre + VERSION=0.5.2 cat >>confdefs.h <<_ACEOF diff --git a/configure.in b/configure.in index ecc32f0..1d6f598 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl abook configure.in AC_INIT(abook.c) -AM_INIT_AUTOMAKE(abook, 0.5.2pre) +AM_INIT_AUTOMAKE(abook, 0.5.2) AM_CONFIG_HEADER(config.h) AC_CANONICAL_HOST diff --git a/ui.c b/ui.c index 3d7e01a..aa49d48 100644 --- a/ui.c +++ b/ui.c @@ -489,10 +489,12 @@ ui_clear_database() void ui_find(int next) { - int item; + int item = -1; static char findstr[MAX_FIELD_LEN]; int search_fields[] = {NAME, EMAIL, NICK, -1}; + clear_statusline(); + if(next) { if( !*findstr ) return; @@ -504,12 +506,15 @@ ui_find(int next) refresh_screen(); } - if( (item = find_item(findstr, curitem + !!next, - search_fields )) >= 0 ) { + if( (item = find_item(findstr, curitem + !!next, search_fields)) < 0) + if((item = find_item(findstr, 0, search_fields)) >= 0) + statusline_addstr( + "Search hit bottom, continuing at top"); + + if(item >= 0) { curitem = item; refresh_list(); } - }