From: Jaakko Heinonen Date: Mon, 10 Nov 2003 08:45:59 +0000 (+0000) Subject: vi-like movements to editor X-Git-Tag: upstream/0.6.1~2^2~234 X-Git-Url: https://git.deb.at/?p=pkg%2Fabook.git;a=commitdiff_plain;h=8d6e833af7291f0134a6777a800807e57546b90b vi-like movements to editor --- diff --git a/edit.c b/edit.c index a2d5d22..4300a18 100644 --- a/edit.c +++ b/edit.c @@ -394,8 +394,10 @@ edit_loop(int item) case 'a': tab = TAB_ADDRESS; break; case 'p': tab = TAB_PHONE; break; case 'o': tab = TAB_OTHER; break; + case 'h': case KEY_LEFT: tab = tab == 0 ? MAX_TAB : tab - 1; break; + case 'l': case KEY_RIGHT: tab = tab == MAX_TAB ? 0 : tab + 1; break; case KEY_UP: diff --git a/help.h b/help.h index 181aa45..0dab18a 100644 --- a/help.h +++ b/help.h @@ -51,7 +51,7 @@ NULL static char *editorhelp[] = { "\n", -" a,c,p,o / left,right change tab\n", +" a,c,p,o / arrows / h,l change tab\n", "\n", " 1 - 5 edit fields\n", "\n",