]> git.wh0rd.org Git - nano.git/commitdiff
ABCD(), main() - Add Alt-whatever-[a-d] support as well as Alt-whatever-[A-D].
authorChris Allegretta <chrisa@asty.org>
Sat, 28 Apr 2001 16:20:06 +0000 (16:20 +0000)
committerChris Allegretta <chrisa@asty.org>
Sat, 28 Apr 2001 16:20:06 +0000 (16:20 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_1_0_branch/nano@614 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
nano.c

index 3a2472d491cfebeeee8f7f08b042b9231eeb8a73..1286f296b5e91b074e6c4efb22133bc192985633 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
 Cvs code -
+- nano.c:
+  ABCD(), main()
+       - Add Alt-whatever-[a-d] support as well as Alt-whatever-[A-D].
 - search.c:
   do_replace()
         - If we manage to make it in somehow with VIEW_MODE on, abort 
diff --git a/nano.c b/nano.c
index 4d53bb0981911ffd0b1cb7cbeea9bfe56dcaf74f..731674ea0e4524cb708d6bd7805c706ac079c0e6 100644 (file)
--- a/nano.c
+++ b/nano.c
@@ -2154,12 +2154,16 @@ int ABCD(int input)
     switch(input)
     {                
        case 'A':
+       case 'a':
            return(KEY_UP);
        case 'B':
+       case 'b':
            return(KEY_DOWN);
        case 'C':
+       case 'c':
            return(KEY_RIGHT);
        case 'D': 
+       case 'd': 
            return(KEY_LEFT);
        default:
            return 0;
@@ -2420,7 +2424,8 @@ int main(int argc, char *argv[])
                /* Alt-O, suddenly very important ;) */
            case 79:
                kbinput = wgetch(edit);
-               if (kbinput <= 'D' && kbinput >= 'A')
+               if ((kbinput <= 'D' && kbinput >= 'A') || 
+                   (kbinput <= 'd' && kbinput >= 'a'))
                   kbinput = ABCD(kbinput);
                else if (kbinput <= 'z' && kbinput >= 'j')
                    print_numlock_warning();
@@ -2520,6 +2525,10 @@ int main(int argc, char *argv[])
                case 'B':
                case 'C':
                case 'D':
+               case 'a':
+               case 'b':
+               case 'c':
+               case 'd':
                    kbinput = ABCD(kbinput);
                    break;
                case 'H':