fix the tty message spacing anomaly for messages \

delivered across level change checkpointing

Reported by entrez.  Simplest test case:  give level 1 a short
annotatation, level teleport to level 2, and level teleport back to
level 1.  The message window will show

|You materialize on another level.  You remember this level as <note>.

but ^P message history will show

|You materialize on another level.
|  You remember this level as <note>.

Spaces inserted to separate two messages that fit together on the
top line become part of the second message when saving a checkpoint
during level change flushes the top line into message history.

Change insurance checkpointing to record the full message history
without flushing the current top line so that toggling 'checkpoint'
doesn't affect what shows up on the screen or in message recall.
This commit is contained in:
PatR
2022-08-30 15:01:49 -07:00
parent ed7e60f661
commit d4f0450afe
3 changed files with 31 additions and 22 deletions

View File

@@ -1248,6 +1248,7 @@ save_currentstate(void)
{
NHFILE *nhfp;
g.program_state.in_checkpoint++;
if (flags.ins_chkpt) {
/* write out just-attained level, with pets and everything */
nhfp = currentlevel_rewrite();
@@ -1262,6 +1263,7 @@ save_currentstate(void)
/* write out non-level state */
savestateinlock();
g.program_state.in_checkpoint--;
}
#endif