summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-28 03:36:05 +0000
committerjkh <jkh@FreeBSD.org>1995-05-28 03:36:05 +0000
commitc8aeb3cc9c2b4a0b0e7fe72830f46ff14d790d65 (patch)
tree7b77fb689ee2f3f69e57226c6994acffd6fdb7a6 /gnu
parentf6adc3d0cb0c4fabebcca758ff1974167658353e (diff)
downloadFreeBSD-src-c8aeb3cc9c2b4a0b0e7fe72830f46ff14d790d65.zip
FreeBSD-src-c8aeb3cc9c2b4a0b0e7fe72830f46ff14d790d65.tar.gz
Don't make TAB and BACK-TAB destroy field contents incorrectly.
Submitted by: gibbs
Diffstat (limited to 'gnu')
-rw-r--r--gnu/lib/libdialog/ui_objects.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gnu/lib/libdialog/ui_objects.c b/gnu/lib/libdialog/ui_objects.c
index 7c08b01..efa39dc 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);
OpenPOWER on IntegriCloud