work around problem with Backspace's generating ASCII 127 on Linux

sometimes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1583 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey 2003-11-04 18:32:35 +00:00
parent 8fa1976796
commit 7776ef9149
2 changed files with 10 additions and 1 deletions

View File

@ -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:

View 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;