summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libdialog/msgbox.c
diff options
context:
space:
mode:
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 fe19d00..c56b58b 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';
OpenPOWER on IntegriCloud