'urgent' messages for curses

Have curses catch up with tty.  Some particular messages override
message suppression after --More-ESC (tty) or >>ESC (curses).
This commit is contained in:
PatR
2021-12-18 11:07:23 -08:00
parent 420d121f93
commit c5544a8011
3 changed files with 10 additions and 3 deletions
+6 -1
View File
@@ -48,7 +48,7 @@ struct window_procs curses_procs = {
#endif
| WC2_FLUSH_STATUS | WC2_TERM_SIZE
| WC2_STATUSLINES | WC2_WINDOWBORDERS | WC2_PETATTR | WC2_GUICOLOR
| WC2_SUPPRESS_HIST | WC2_MENU_SHIFT),
| WC2_SUPPRESS_HIST | WC2_URGENT_MESG | WC2_MENU_SHIFT),
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */
curses_init_nhwindows,
curses_player_selection,
@@ -498,6 +498,11 @@ curses_putstr(winid wid, int attr, const char *text)
mesgflags = attr & (ATR_URGENT | ATR_NOHISTORY);
attr &= ~mesgflags;
/* this is comparable to tty's cw->flags &= ~WIN_STOP; if messages are
being suppressed after >>ESC, override that and resume showing them */
if ((mesgflags & ATR_URGENT) != 0)
curs_mesg_suppress_turn = -1L;
if (wid == WIN_MESSAGE && (mesgflags & ATR_NOHISTORY) != 0) {
/* display message without saving it in recall history */
curses_count_window(text);