summaryrefslogtreecommitdiff
path: root/gnu/lib/libdialog/msgbox.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1994-10-28 03:08:28 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1994-10-28 03:08:28 +0000
commit3f20de5a5ffbacb67a9fc543362201822e9cdb3d (patch)
treeececb7800f05ccfd7dbac76ba80123d0f3fc52a4 /gnu/lib/libdialog/msgbox.c
parent204218e079022dd57820bc583b7e7c9109b2f893 (diff)
Notes
Diffstat (limited to 'gnu/lib/libdialog/msgbox.c')
-rw-r--r--gnu/lib/libdialog/msgbox.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/lib/libdialog/msgbox.c b/gnu/lib/libdialog/msgbox.c
index fe19d005846c..c56b58b41c8d 100644
--- a/gnu/lib/libdialog/msgbox.c
+++ b/gnu/lib/libdialog/msgbox.c
@@ -53,7 +53,8 @@ int dialog_msgbox(unsigned char *title, unsigned char *prompt, int height, int w
waddch(dialog, ' ');
}
wattrset(dialog, dialog_attr);
- print_autowrap(dialog, prompt, width-2, 1, 2);
+ wmove(dialog, 1, 2);
+ print_autowrap(dialog, prompt, height-1, width-2, width, 1, 2, TRUE, FALSE);
if (pause) {
wattrset(dialog, border_attr);
@@ -68,8 +69,10 @@ int dialog_msgbox(unsigned char *title, unsigned char *prompt, int height, int w
waddch(dialog, ' ');
print_button(dialog, " OK ", height-2, width/2-4, TRUE);
wrefresh(dialog);
- while (key != ESC && key != '\n' && key != ' ')
+ while (key != ESC && key != '\n' && key != ' ' && key != '\r')
key = wgetch(dialog);
+ if (key == '\r')
+ key = '\n';
}
else {
key = '\n';