diff --git a/src/sbbs3/putmsg.cpp b/src/sbbs3/putmsg.cpp index 86288566ef9a6cf7cec7433f77f8f2ebe9754044..c6213fd768ae24557648c0b4739f4a490bbb21ac 100644 --- a/src/sbbs3/putmsg.cpp +++ b/src/sbbs3/putmsg.cpp @@ -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; }