curses: fix "---" separators in ^P output
This one has me baffled, first how/when it happened and then why no
one reported it. The line
current_mesg->turn = g.moves;
vanished from mesg_add_line() at some point. It is visible in diff
context of commit 99ed00012e from March,
2019 but I can't find any commit since that time which removed it.
[I've been using
git log --no-min-parents --no-max-parents --patch win/curses/cursmesg.c
and then searching within the pager. Maybe that's flaky, but if so,
things wouldn't be any less strange.]
The missing line resulted in mesg->turn being uninitialized, so when
^P compared consecutive messages to decide whether they were issued on
the same turn, arbitrary junk made them all seem to be from different
turns so "---" got inserted before every message. I suppose that if
someone uses a malloc that zeroes the memory it hands out, mesg->turn
field would always be 0 and ^P would behave as if all messages were
from the same turn, so not show any "---" separators. Then players
might not be aware that "---" between groups of messages was intended.
[The messages ought to be grouped by move rather than by turn, but
that's something the core would have to provide.]
This commit is contained in:
@@ -950,6 +950,10 @@ curses: line input that doesn't take place on the bottom line of the message
|
||||
curses: menu headings didn't use default text color
|
||||
curses: #perminv changes disabled menu_headings attribute for persistent
|
||||
inventory window headings; reinstate that
|
||||
curses: messages were tagged by turn in 3.6.x so that ^P can place a separator
|
||||
between groups of messages; somehow the line of code that recorded
|
||||
the turn vanished so ^P behaved as if every message came on its own
|
||||
distinct turn, resulting in lots of "---" separators
|
||||
Qt: at Xp levels above 20 with 'showexp' On, the combined status field
|
||||
"Level:NN/nnnnnnnn" was too big and truncated by a char at each end
|
||||
Qt: searching a text window for something that wasn't found and then searching
|
||||
|
||||
Reference in New Issue
Block a user