fix for urgent messages for tty

If messages aren't currently being skipped due to --More--ESC when a
message flagged as urgent is issued and that urgent message itself
triggers --More-- to have the user acknowledge the previous message,
and the user types ESC at this new --More--, message suppression
starts.  With the overly simplistic existing code from a few days
ago, it was too late for the current message to override that.  Since
the urgent message gets buffered like any other (until another message
needs the top line or until input is needed), it wouldn't be shown
when the next message came along and discovered suppression in effect.

I'm not sure that all the changes here are necessary; there was some
flailing about involved.  But it seems to behave as intended now.
This commit is contained in:
PatR
2021-12-20 08:16:13 -08:00
parent 63e47d8ac8
commit aaed434d46
3 changed files with 56 additions and 30 deletions

View File

@@ -49,8 +49,13 @@ struct WinDesc {
/* window flags */
#define WIN_CANCELLED 1
#define WIN_STOP 1 /* for NHW_MESSAGE; stops output */
#define WIN_STOP 1 /* for NHW_MESSAGE; stops output; sticks until
* next input request or reversed by WIN_NOSTOP */
#define WIN_LOCKHISTORY 2 /* for NHW_MESSAGE; suppress history updates */
#define WIN_NOSTOP 4 /* current message has been designated as urgent;
* prevents WIN_STOP from becoming set if current
* message triggers --More-- and user types ESC
* (current message won't have been seen yet) */
/* topline states */
#define TOPLINE_EMPTY 0 /* empty */