]> git.wh0rd.org Git - nano.git/commitdiff
do_browser() - More Picoish keystrokes for the browser, ^P, ^N, etc, for up, down...
authorChris Allegretta <chrisa@asty.org>
Mon, 2 Jul 2001 01:31:44 +0000 (01:31 +0000)
committerChris Allegretta <chrisa@asty.org>
Mon, 2 Jul 2001 01:31:44 +0000 (01:31 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_1_0_branch/nano@710 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
files.c

index 4f36379ee5cd1affac3b566acc2e3f64d2b82e74..d978a9add1bfdf79c59b563a8ee6e65287bcb4a4 100644 (file)
--- 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 ccccabc91d1505b41951f461f0053b7c1dfb4efd..f0f6dfd0f2cb7b9cdce077ed9b30135a2a34cf6a 100644 (file)
--- 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;