(DLR)
do_yesno()
- Allow refreshing the screen via Ctrl-L, as Pico does. (DLR)
+ - Add a missing assert, and use display_string() to display the
+ prompt, so that we don't end it in the middle of a multibyte
+ character if it's more than (COLS - 1) bytes long. (DLR)
total_redraw()
- Simplify to call clearok(TRUE) and wrefresh() on edit, which
updates the entire screen in fewer function calls. (DLR)
const char *yesstr; /* String of yes characters accepted. */
const char *nostr; /* Same for no. */
const char *allstr; /* And all, surprise! */
+ char *expmsg; /* Expanded version of msg. */
+
+ assert(msg != NULL);
/* yesstr, nostr, and allstr are strings of any length. Each string
* consists of all single-byte characters accepted as valid
wattron(bottomwin, A_REVERSE);
blank_statusbar();
- mvwaddnstr(bottomwin, 0, 0, msg, COLS - 1);
+
+ expmsg = display_string(msg, 0, COLS - 1, FALSE);
+ mvwaddstr(bottomwin, 0, 0, msg);
+ free(expmsg);
wattroff(bottomwin, A_REVERSE);