Experimental patch to use Rubout as Backspace

This commit is contained in:
Michiel Broek
2002-09-27 17:58:24 +00:00
parent 7a26f2d5eb
commit daa714effd
4 changed files with 158 additions and 150 deletions

View File

@@ -252,6 +252,7 @@ char *edit_field(int y, int x, int w, int p, char *s_)
newinsert(1, YELLOW, BLUE);
break;
case KEY_BACKSPACE:
case KEY_RUBOUT:
if (strlen(s) > 0) {
if (curpos >= strlen(s)) {
curpos--;
@@ -264,7 +265,6 @@ char *edit_field(int y, int x, int w, int p, char *s_)
} else
putchar(7);
break;
case KEY_RUBOUT:
case KEY_DEL:
if (strlen(s) > 0) {
if ((curpos) == (strlen(s) -1)) {