From 267e12ca09745a89160b3956da82040d87e8fb61 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Sun, 28 May 1995 03:36:05 +0000 Subject: [PATCH] Don't make TAB and BACK-TAB destroy field contents incorrectly. Submitted by: gibbs --- gnu/lib/libdialog/ui_objects.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/lib/libdialog/ui_objects.c b/gnu/lib/libdialog/ui_objects.c index 7c08b01a8888..efa39dcc9d3c 100644 --- a/gnu/lib/libdialog/ui_objects.c +++ b/gnu/lib/libdialog/ui_objects.c @@ -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);