Don't make TAB and BACK-TAB destroy field contents incorrectly.

Submitted by:	gibbs
This commit is contained in:
Jordan K. Hubbard 1995-05-28 03:36:05 +00:00
parent 337bd0b846
commit 267e12ca09

View File

@ -304,7 +304,7 @@ SelectStringObj(StringObj *so)
strcpy(tmp, so->s);
key = line_edit(so->win, so->y+2, so->x+1,
so->len, so->w-2, inputbox_attr, TRUE, tmp);
if ((key == '\n') || (key == '\r')) {
if ((key == '\n') || (key == '\r') || (key == '\t') || key == (KEY_BTAB) ) {
strcpy(so->s, tmp);
}
RefreshStringObj(so);
@ -318,7 +318,6 @@ SelectStringObj(StringObj *so)
return(SEL_BACKTAB);
}
if ((key == '\n') || (key == '\r')) {
strcpy(so->s, tmp);
return(SEL_CR);
}
return(key);