From 658f90b47f83752cec3437e64bb298f7e10fbd1e Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Mon, 2 Jul 2001 01:31:44 +0000 Subject: [PATCH] do_browser() - More Picoish keystrokes for the browser, ^P, ^N, etc, for up, down, etc, and add the consistent ^C to exit (Jim Knoble) git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_1_0_branch/nano@710 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ files.c | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4f36379e..d978a9ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ CVS code - +- files.c: + do_browser() + - More Picoish keystrokes for the browser, ^P, ^N, etc, for up, + down, etc, and add the consistent ^C to exit (Jim Knoble). nano 1.0.3 - 07/01/2001 - Makefile.am: diff --git a/files.c b/files.c index ccccabc9..f0f6dfd0 100644 --- a/files.c +++ b/files.c @@ -1173,22 +1173,29 @@ char *do_browser(char *inpath) lineno = selected / width; switch (kbinput) { + case NANO_UP_KEY: case KEY_UP: case 'u': if (selected - width >= 0) selected -= width; break; + case NANO_BACK_KEY: case KEY_LEFT: + case NANO_BACKSPACE_KEY: + case 127: case 'l': if (selected > 0) selected--; break; + case NANO_DOWN_KEY: case KEY_DOWN: case 'd': if (selected + width <= numents - 1) selected += width; break; + case NANO_FORWARD_KEY: case KEY_RIGHT: + case NANO_TAB_KEY: case 'r': if (selected < numents - 1) selected++; @@ -1228,7 +1235,7 @@ char *do_browser(char *inpath) selected = numents - 1; break; case KEY_ENTER: - case NANO_CONTROL_M: + case NANO_ENTER_KEY: case 's': /* More Pico compatibility */ case 'S': @@ -1268,6 +1275,7 @@ char *do_browser(char *inpath) case 'Q': case 'e': /* Pico compatibility, yeech */ case 'E': + case NANO_CANCEL_KEY: case NANO_EXIT_FKEY: abort = 1; break; -- 2.39.5