]> git.wh0rd.org Git - nano.git/commitdiff
work around problem with Backspace's generating ASCII 127 on Linux
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 4 Nov 2003 18:32:35 +0000 (18:32 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 4 Nov 2003 18:32:35 +0000 (18:32 +0000)
sometimes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1583 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/winio.c

index 5dbe0eb284e63870b1d677dbfa1ac0b9b495deae..95da3e7f4cceac23f8249e624707ce49d2aed4c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,10 @@ CVS code -
   do_replace_loop()
        - Fix potential infinite loop when doing a forward regex replace
          of "$". (DLR; found by Mike Frysinger)
+- winio.c:
+  get_accepted_kbinput()
+       - Translate Ctrl-8 into NANO_DELETE_KEY, since it apparently is
+         generated at the statusbar prompt sometimes on Linux. (DLR)
 
 GNU nano 1.3.0 - 2003.10.22
 - General:
index b221a7ea57b63a1d8b52a0078fed604add7f6165..844ce7c931cb4c9d94ac5e1fdb676e76b610d518 100644 (file)
@@ -166,6 +166,11 @@ int get_accepted_kbinput(WINDOW *win, int kbinput, int *meta,
                    *meta = 1;
            }
            break;
+       case NANO_CONTROL_8:
+           /* Terminal breakage, part 2: We shouldn't get Ctrl-8
+            * (Ctrl-?) for Backspace, but we do sometimes on Linux. */
+           kbinput = NANO_BACKSPACE_KEY;
+           break;
        case KEY_DOWN:
            kbinput = NANO_DOWN_KEY;
            break;
@@ -185,7 +190,7 @@ int get_accepted_kbinput(WINDOW *win, int kbinput, int *meta,
            kbinput = NANO_BACKSPACE_KEY;
            break;
        case KEY_DC:
-           /* Terminal breakage, part 2: We should only get KEY_DC when
+           /* Terminal breakage, part 3: We should only get KEY_DC when
             * hitting Delete, but we get it when hitting Backspace
             * sometimes on FreeBSD.  Thank you, Lee Nelson. */
            kbinput = (rebind_delete) ? NANO_BACKSPACE_KEY : NANO_DELETE_KEY;