nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit a2c02e9c8d2369fbc364138d895e2f75ac2b415c
parent df20e834122b6f8443aeb05907b39826d892c086
Author: Chris Allegretta <chrisa@asty.org>
Date:   Mon,  2 Jul 2001 01:31:44 +0000

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/trunk/nano@710 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 2++
Mfiles.c | 10++++++++--
2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -87,6 +87,8 @@ Cvs code - - Added the "Goto Directory" code (Rocco) - Don't shift the size of the file is it's less than 1K. Fixed files less than 1K being displayed as 0B (Rocco). + - More Picoish keystrokes for the browser, ^P, ^N, etc, for up, + down, etc, and add the consistent ^C to exit (Jim Knoble). do_writeout() - New code to allow writing selected text to a separate file. When this is done, the current state is prserved. diff --git a/files.c b/files.c @@ -1298,22 +1298,28 @@ char *do_browser(char *inpath) break; #endif #endif + 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 KEY_DOWN: + case NANO_DOWN_KEY: case 'd': if (selected + width <= numents - 1) selected += width; break; case KEY_RIGHT: + case NANO_FORWARD_KEY: case 'r': if (selected < numents - 1) selected++; @@ -1353,7 +1359,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': @@ -1427,11 +1433,11 @@ char *do_browser(char *inpath) return do_browser(path); /* Stuff we want to abort the browser */ - case NANO_CONTROL_C: case 'q': case 'Q': case 'e': /* Pico compatibility, yeech */ case 'E': + case NANO_CANCEL_KEY: case NANO_EXIT_FKEY: abort = 1; break;