summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2002-06-13 23:39:35 +0000
committerdougb <dougb@FreeBSD.org>2002-06-13 23:39:35 +0000
commit1f8d67dfae3bcd1b219934baf162c02edf8c7aa3 (patch)
treeb01e62a1207877ae51334214c641b3bdfd16ebe2 /gnu
parent8b53de5eaad88aa5da73d918840cc537b5ddfdc4 (diff)
downloadFreeBSD-src-1f8d67dfae3bcd1b219934baf162c02edf8c7aa3.zip
FreeBSD-src-1f8d67dfae3bcd1b219934baf162c02edf8c7aa3.tar.gz
In addition to exiting the dialog via ESC, the user could also have
exited via \r, \n, or ' ' (space); all of which are valid, non-error responses.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/lib/libdialog/textbox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/lib/libdialog/textbox.c b/gnu/lib/libdialog/textbox.c
index bfbf81b..8c6e1a1 100644
--- a/gnu/lib/libdialog/textbox.c
+++ b/gnu/lib/libdialog/textbox.c
@@ -424,7 +424,7 @@ int dialog_textbox(unsigned char *title, unsigned char *file, int height, int wi
delwin(dialog);
free(buf);
close(fd);
- return -1; /* ESC pressed */
+ return (key == ESC ? -1 : 0);
}
/* End of dialog_textbox() */
OpenPOWER on IntegriCloud