Skip to content
Snippets Groups Projects
Commit f61e7d93 authored by rswindell's avatar rswindell
Browse files

This is a bit of a hack for Nelgin, who noticed that novice menu mode

would not always auto-redisplay menu files when the user hits 'Q' (or 'N'
or Ctrl-C) at auto-pause prompts:

When displaying a "message" (e.g. file), if the console abort flag is set
before a single line has been displayed, clear the abort flag. This most
likely means a pause (hit a key) prompt was automatically displayed due to
a clear screen code in the message/file and the user hit 'Q' or 'N' or
Ctrl-C at the prompt. In this special case, don't treat that as an
"abort message" command and keep displaying the message/file.

Once one or more lines in the message/file have been displayed, then the
behavior is the same as before: a console abort (even as a result of an
auto-pause prompt key) will stop the display of the current message/file.
parent 833246cf
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@ char sbbs_t::putmsg(const char *buf, long mode)
int orgcon=console,i;
ulong l=0,sys_status_sav=sys_status;
int defered_pause=FALSE;
uint lines_printed = 0;
attr_sp=0; /* clear any saved attributes */
tmpatr=curatr; /* was lclatr(-1) */
......@@ -91,7 +92,9 @@ char sbbs_t::putmsg(const char *buf, long mode)
break;
else {
ctrl_a(str[l+1]);
l+=2;
if((sys_status&SS_ABORT) && !lines_printed) /* Aborted at (auto) pause prompt (e.g. due to CLS)? */
sys_status &= ~SS_ABORT; /* Clear the abort flag (keep displaying the msg/file) */
l+=2;
}
}
else if((str[l]=='`' || str[l]=='') && str[l+1]=='[') {
......@@ -227,6 +230,7 @@ char sbbs_t::putmsg(const char *buf, long mode)
attr(LIGHTGRAY);
if(l==0 || str[l-1]!='\r') /* expand sole LF to CR/LF */
outchar('\r');
lines_printed++;
}
/* ansi escape sequence */
......@@ -259,6 +263,8 @@ char sbbs_t::putmsg(const char *buf, long mode)
}
i=show_atcode((char *)str+l); /* returns 0 if not valid @ code */
l+=i; /* i is length of code string */
if((sys_status&SS_ABORT) && !lines_printed) /* Aborted at (auto) pause prompt (e.g. due to CLS)? */
sys_status &= ~SS_ABORT; /* Clear the abort flag (keep displaying the msg/file) */
if(i) /* if valid string, go to top */
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment