]> git.deb.at Git - pkg/abook.git/commitdiff
Added editor commands
authorJaakko Heinonen <jheinonen@users.sourceforge.net>
Wed, 30 May 2001 06:43:11 +0000 (06:43 +0000)
committerJaakko Heinonen <jheinonen@users.sourceforge.net>
Wed, 30 May 2001 06:43:11 +0000 (06:43 +0000)
ChangeLog
configure
configure.in
edit.c
help.h

index 2d71e8d95fd2a1de4c8d32bdc2464897650d1a83..887554401d7495c311771578c42ac0c2bcae30c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
  - changed SIGINT behaviour
  - html export filter creates now valid html documents
  - ablity to print/export only selected items
+ - new editor commands
 
 0.4.12
  - added man page for abookrc (Alan Ford)
index 2ac8ce64d140ae18f052ed026f6f4dcaaaff87c1..8e271672bd98695b18d61ff1a83c9aa8c828e2d2 100755 (executable)
--- a/configure
+++ b/configure
@@ -697,7 +697,7 @@ fi
 
 PACKAGE=abook
 
-VERSION=0.4.13pre1
+VERSION=0.4.13pre2-cvs
 
 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
index b8a13b73b0f230a147d6cbe75ee7bf6079dcc250..9a9a2521db1e55a023e316bc8561a2e2ac85c2ff 100644 (file)
@@ -1,7 +1,7 @@
 dnl abook configure.in
 
 AC_INIT(abook.c)
-AM_INIT_AUTOMAKE(abook, 0.4.13pre1)
+AM_INIT_AUTOMAKE(abook, 0.4.13pre2-cvs)
 AM_CONFIG_HEADER(config.h)
 
 AC_CANONICAL_HOST
diff --git a/edit.c b/edit.c
index ae7643ea95ef12f060fd15003fbc11f22a9521b8..e41d707d1d5d22e6f87a75cbdd4a80031d541635 100644 (file)
--- a/edit.c
+++ b/edit.c
@@ -374,16 +374,20 @@ edit_loop(int item)
                               break;
                case KEY_RIGHT: tab = tab == MAX_TAB ? 0 : tab + 1;
                                break;
+               case '<':
+               case 'k': if(is_valid_item(item-1)) item--; break;
+               case '>':
+               case 'j': if(is_valid_item(item+1)) item++; break;
                case 'r': roll_emails(item); break;
                case '?': display_help(HELP_EDITOR); break;
                case 'u': edit_undo(item, RESTORE_ITEM); break;
                case 'm': launch_mutt(item);
                case 'v': launch_wwwbrowser(item);
                case 12 : clearok(stdscr, 1); break; /* ^L (refresh screen) */
-               default:  return edit_field(tab, c, item);
+               default:  return edit_field(tab, c, item) ? item : -1;
        }
 
-       return 1;
+       return item;
 }
 
 void
@@ -397,8 +401,9 @@ edit_item(int item)
        }
 
        init_editor();
-       while( edit_loop(item) )
-               ;
+
+       while( (item = edit_loop(item)) >= 0 )
+               curitem = item; /* hmm, this is not very clean way to go */
 
        close_editor();
 }
diff --git a/help.h b/help.h
index 2f1120d8cb0d66fc83c69bbccdab8f50a933bcda..a18f8f2de45f74d70f2d15d253a4e278cd93340c 100644 (file)
--- a/help.h
+++ b/help.h
@@ -51,6 +51,9 @@ static char *editorhelp[] = {
 "\n",
 "      1 - 5                   edit fields\n",
 "\n",
+"      k or <                  previous item\n",
+"      j or >                  next item\n",
+"\n",
 "      r                       roll e-mail addresses\n",
 "\n",
 "      u                       undo\n",